Xcode和iOS模拟器应用程序没有连接
我开发了一个应用程序,使用Ionic2
。我可以在浏览器和Android模拟器中运行它,没有任何问题。我现在已将它部署到iOS Simulator
(Xcode
),并且我得到以下两个问题(我不确定它们是否相关)。Xcode和iOS模拟器应用程序没有连接
-
iOS Simulator
有互联网连接,因为当我在模拟器中访问Safari时,它可以看到互联网。但是,我的应用程序需要访问某些RESTful服务(托管在AWS
上),但这样做时会挂起。这就好像该应用程序无法访问互联网。
我得到日志中的以下内容:
2017-02-23 16:33:37.356 theWhoZoo[11863:1077448] Resetting plugins due to page load. 2017-02-23 16:33:39.236 theWhoZoo[11863:1077448] DEVICE READY FIRED AFTER 1420 ms 2017-02-23 16:33:39.275 theWhoZoo[11863:1077448] This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationWhenInUseUsageDescription key with a string value explaining to the user how the app uses this data
- 当我尝试使用
FireBase
登录,我收到以下错误:
This operation is not supported in the environment this application is running on. "location.protocol" must be http or https and web storage must be enabled.
任何帮助将不胜感激。
通过查找here修复了问题1。需要将下面的行添加到...info.plist
文件:
<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) location use.</string>
问题2依然悬而未决。