2017-08-11 37 views
0

我正在研究當前在連接的iOS設備上運行良好的Ionic 3項目(使用ionic cordova run ios --device命令),並構建包括Ionic CLI和Xcode。Ionic 3/Cordova:應用程序通過Ionic CLI運行,但不通過Xcode(內置Xcode成功)

但是,當我嘗試通過Xcode在我的設備上運行時,它掛在啓動屏幕上,我在Xcode控制檯中看到下面的錯誤。此行爲也發生在我目前在TestFlight上的測試版上 - 所以我不認爲它受限於我的環境。

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,但步驟有(NPM運行安裝)並沒有幫助

似乎在項目&也許他們的權限進行相關的插件,但是,我要明確我已經在蘋果開發者網站上正確設置了App ID,爲Dev和Distribution都啓用了推送服務,並將App ID關聯到Dev Provisioning Profile和Distribution Provisioning Profile。

我有這個開發者帳戶與Xcode關聯,並且正在使用具有我剛剛描述的應用ID和其他設置的帳戶簽署構建。在我的開發設備上運行時,推送通知(以及其他所有內容)適合我。

我的預感是這個與我正在使用的構建/項目選項相結合的推送插件,但我確實在我的項目配置中有APS權利,並且推送功能設置爲ON該項目。

錯誤消息本身引用了OpenRadar issue,但該頁面上沒有任何內容可以幫助您。我以一位用戶提到的方式查看了我的Info.plist文件,但找不到可能與此問題相關的任何設置。有一個應用傳輸安全設置字典與允許的域名,但我不明白這會是什麼問題,因爲我甚至不能運行在我的開發設備在允許的域名。

我正在使用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" 
     ] 
    } 
} 

UPDATE

從我的項目中移除iOS平臺(另一個原因)後重新添加,我不再看到啓動屏幕上的掛起行爲。我仍然可以看到控制檯輸出中的錯誤 - 但是看起來它並不是我觀察到的掛起的原因。我的猜測是刪除並重新添加iOS平臺會重置與我的插件相關的內容。

回答

0

發佈我更新爲封閉的答案,萬一別人碰到這樣的:

從我的項目中移除iOS平臺(另一個原因)後重新添加它,我再也看不到掛行爲在啓動屏幕上。我仍然可以看到控制檯輸出中的錯誤 - 但是看起來它並不是我觀察到的掛起的原因。我的猜測是刪除並重新添加iOS平臺會重置與我的插件相關的內容。

相關問題