我正在开发一个Ionic 3项目,该项目目前在连接的iOS设备上运行正常(使用ionic cordova run ios --device
命令),并使用Ionic CLI和Xcode进行构建。
然而,当我尝试通过Xcode在我的设备上运行时,它会挂起在启动屏幕上,我在Xcode控制台中看到以下错误。这种行为也发生在我目前在TestFlight上的beta版本中 - 所以我不认为它仅限于我的环境。
2017-08-11 10:42:15.996743-0400 MyApp[11551:3839240] libMobileGestalt MobileGestaltSupport.m:153: pid 11551 (MyApp) does not have sandbox access for <deviceID?> and IS NOT appropriately entitled
2017-08-11 10:42:15.996819-0400 MyApp[11551:3839240] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
此错误会在Google和StackOverflow上带来很多结果,但我无法找到解决方案。有recent SO question答案与Ionic有特别相关,但那里的步骤(运行npm install)没有帮助
这似乎与项目中的插件有关。也许是他们的权限,但是我想清楚我已经在Apple Developer网站上正确设置了App ID,为Dev和Distribution启用了Push Services,并将App ID与Dev Provisioning Profile和Distribution Provisioning相关联轮廓。
我有这个与Xcode关联的开发人员帐户,并且正在使用具有应用程序ID和我刚刚描述的其他设置的帐户对构建进行签名。在我的开发设备上运行时,推送通知(以及其他所有内容)对我来说都很合适。
我的预感是,这与推送插件有关,我将与构建/项目选项结合使用,但我的项目配置中确实有APS权利,推送功能设置为ON在项目中。
错误消息本身引用了OpenRadar issue,但该页面上没有任何内容确实有帮助。我看了一个用户提到的Info.plist
文件,但我找不到可能与此问题相关的任何设置。有一个包含允许域的应用传输安全设置字典,但是我不知道这是怎么回事,因为我甚至无法在允许域中的开发设备上运行。< / p>
我正在使用Xcode 8.3.3并尝试在iOS 10.3上构建设备。我的离子信息和package.json
:
cli packages: (/Users/david/Source/sideline-app/node_modules)
@ionic/cli-plugin-cordova : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Android SDK Tools : 25.2.5
Node : v7.4.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 6.0.0
npm : 4.0.5
的package.json
{
"name": "MyApp",
"version": "0.0.1",
"author": "AppAuthor",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.0",
"@angular/http": "4.1.0",
"@angular/platform-browser": "4.1.0",
"@angular/platform-browser-dynamic": "4.1.0",
"@angular/tsc-wrapped": "^4.3.4",
"@ionic-native/contacts": "^4.1.0",
"@ionic-native/core": "3.7.0",
"@ionic-native/facebook": "^4.1.0",
"@ionic-native/keyboard": "^4.1.0",
"@ionic-native/mixpanel": "^4.1.0",
"@ionic-native/push": "^4.1.0",
"@ionic-native/social-sharing": "^4.1.0",
"@ionic-native/splash-screen": "3.7.0",
"@ionic-native/status-bar": "3.7.0",
"@ionic/app-scripts": "^2.1.3",
"@ionic/storage": "^2.0.1",
"ajv": "^5.2.2",
"autoprefixer": "^7.1.2",
"chat-plugin": "file:onymos-plugin-chat",
"cordova-ios": "^4.4.0",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-contacts": "^2.3.1",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-facebook4": "^1.9.1",
"cordova-plugin-mixpanel": "^3.1.0",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-plugin-x-socialsharing": "^5.1.8",
"cordova-sqlite-storage": "^2.0.4",
"es6-promise-plugin": "^4.1.0",
"ionic-angular": "^3.6.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-auto-complete": "^1.5.2-beta",
"ionicons": "3.0.0",
"ng2-validation": "^4.2.0",
"onymos-plugin-chat": "file:onymos-plugin-chat",
"phonegap-plugin-push": "^2.0.0",
"rxjs": "^5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "^0.8.12"
},
"devDependencies": {
"@angular/cli": "^1.2.7",
"@ionic/app-scripts": "1.3.7",
"@ionic/cli-plugin-cordova": "1.6.2",
"@ionic/cli-plugin-ionic-angular": "1.4.1",
"ionic": "3.7.0",
"typescript": "2.2.1"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-sqlite-storage": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-contacts": {
"CONTACTS_USAGE_DESCRIPTION": " "
},
"cordova-plugin-facebook4": {
"APP_ID": <FB app ID>,
"APP_NAME": "MyApp"
},
"cordova-plugin-mixpanel": {},
"phonegap-plugin-push": {},
"onymos-plugin-chat": {}
},
"platforms": [
"ios"
]
}
}
更新
从我的项目中移除iOS平台(出于其他原因)并重新添加它后,我不再在启动屏幕上看到挂起行为。我仍然看到控制台输出中的错误 - 但是它并不表示它是我正在观察的悬挂的原因。我的猜测是删除并重新添加iOS平台会重置与我的某个插件相关的内容。
答案 0 :(得分:0)
将我的更新发布为关闭的答案,以防其他人点击此内容:
从我的项目中移除iOS平台(出于其他原因)并重新添加它后,我不再在启动屏幕上看到挂起行为。我仍然在控制台输出中看到错误 - 但是看起来它并不是我正在观察的悬挂的原因。我的猜测是删除并重新添加iOS平台会重置与我的某个插件相关的内容。