V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
arkilis
V2EX  ›  iDev

swift 能跟远程 mysql server 直接通信吗?

  •  
  •   arkilis · 2014-09-28 09:23:41 +08:00 · 3960 次点击
    这是一个创建于 3500 天前的主题,其中的信息可能已经有所发展或是发生改变。
    或者有其他比较成熟的解决方案。

    谢谢
    15 条回复    2014-10-04 21:12:44 +08:00
    tabris17
        1
    tabris17  
       2014-09-28 09:51:29 +08:00
    你是要纯swift实现?网上有mysql协议规范,你可以从底层实现
    Zhang
        2
    Zhang  
       2014-09-28 10:04:04 +08:00
    romotc
        3
    romotc  
       2014-09-28 10:12:07 +08:00
    这样做安全吗?
    explon
        4
    explon  
       2014-09-28 10:19:36 +08:00
    @romotc 可能楼主只要开一个只读数据库
    arkilis
        5
    arkilis  
    OP
       2014-09-28 10:31:07 +08:00
    刚接触IOS开发,不太了解怎么连接数据库的。看到有人在网上说用 web page 做数据转发。岂不是比较麻烦以及不安全?
    sobigfish
        6
    sobigfish  
       2014-09-28 10:32:15 +08:00
    object-c的有(是想写client?)

    sequel pro
    http://www.sequelpro.com/docs/Source_Code
    sobigfish
        7
    sobigfish  
       2014-09-28 10:32:51 +08:00
    直接连mysql才是最不安全的做法。
    justfly
        8
    justfly  
       2014-09-28 11:15:57 +08:00
    手机直连DB? 不应该是访问API吗
    loveminds
        9
    loveminds  
       2014-09-28 12:26:30 +08:00
    @justfly
    @sobigfish LZ可能是要写个管理数据库的程序
    arkilis
        10
    arkilis  
    OP
       2014-09-28 16:03:55 +08:00
    @sobigfish
    @justfly
    @loveminds

    就是想写个离线存储的。
    pimin
        11
    pimin  
       2014-09-28 16:08:15 +08:00 via iPhone
    @arkilis
    应该要webserver做中转吧,从哪方面来说都好。
    romotc
        12
    romotc  
       2014-09-28 16:09:52 +08:00
    最好还是做API接口吧,可维护性、安全性都比直接读数据库要好一些。
    初期可以先简单做下接口加密或者直接用https。
    duzhe0
        13
    duzhe0  
       2014-09-28 17:30:47 +08:00
    把db暴露在公网不合适吧
    albusshin
        14
    albusshin  
       2014-09-28 17:45:40 +08:00
    去stackoverflow提问啊楼主
    hjiang
        15
    hjiang  
       2014-10-04 21:12:44 +08:00
    这个不是技术上能不能的问题,而是是否合适的问题。你应该用 AVOS Cloud :-)
    https://avoscloud.com
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5732 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:41 · PVG 10:41 · LAX 19:41 · JFK 22:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.