当我在 XCode 模拟器上运行 Realm 演示应用程序(链接)时,它按预期工作。当我尝试在我的联机设备上运行它时出现以下错误(屏幕已解锁):
fatal error: Optional(Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x1740467b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}): file /Users/grant/Apps/RealmTasksTutorial/RealmTasksTutorial/ViewController.swift, line 47
2016-10-28 11:16:59.148862 RealmTasksTutorial[1930:429715] fatal error: Optional(Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x1740467b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}): file /Users/grant/Apps/RealmTasksTutorial/RealmTasksTutorial/ViewController.swift, line 47
(lldb)
Realm 在开发时是要在实际设备上工作还是只在模拟器上工作?