在真實設備上運行用NativeScrip編寫的iOS應用程序是不可能的。我嘗試了一切。應用程序適用於iOS Symulator和Android模擬器,但是當我連接iOS設備和運行ins run ios
一個得到一個錯誤NativeScript - 不能在帶有Firebase插件的iOS設備上運行
**匯出成功**
項目成功建立。
安裝...
無法在設備上應用更改:XXXXX。錯誤是:無法安裝
在標識符爲XXXXX的設備上 錯誤是:無法安裝應用程序。
我去platforms/ios
和運行產生的Xcode項目。然後我建立它並嘗試運行。錯誤出現了:
在應用程序的代碼簽名 應享權利文件中指定的授權是無效的,不允許的,或者不符合你的供應配置文件中指定的 。 (0xE8008016)。
我已經設置適當的Team
和Provision Profile
。
我不知道如何解決這個問題。我只有一個想法。我已經安裝了需要keychain_sharing的firebase插件,或許這是Entitlements
的問題。
我package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescrip.awsomename",
"tns-android": {
"version": "3.1.1"
},
"tns-ios": {
"version": "3.2.0-2017-8-25-1"
}
},
"dependencies": {
"@angular/animations": "~4.2.0",
"@angular/common": "~4.2.0",
"@angular/compiler": "~4.2.0",
"@angular/core": "~4.2.0",
"@angular/forms": "~4.2.0",
"@angular/http": "~4.2.0",
"@angular/platform-browser": "~4.2.0",
"@angular/router": "~4.2.0",
"nativescript-angular": "~4.2.0",
"nativescript-plugin-firebase": "^4.0.6",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.4.2",
"tns-core-modules": "~3.1.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.5.0",
"typescript": "~2.4.2"
}
}
我build.cconfig
從AppResorces/iOS
// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution
// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = [HERE I HAVE SET MY DEV TEAM ID];
CODE_SIGN_ENTITLEMENTS = swapmobile/swapmobile.entitlements
我使用Xcode應用程序開始工作8.3.2
編輯
後tns plugin remove nativescript-plugin-firebase
。問題在於Firebase插件。