ionic build ios 成功但 ionic build ios --release 失败

ionic build ios successful but ionic build ios --release failed

我正在使用 ionic2 开发内部移动应用程序。我可以通过以下方式成功构建 ios:

ionic build ios and
ionic build ios --prod

但是当我这样做时它一直失败

ionic build ios --release

错误信息如下:

Check dependencies

Code Signing Error: CMLookup has conflicting provisioning settings. CMLookup is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'



** ARCHIVE FAILED **

所以我在xcode中打开项目,取消勾选automatically manage signing,勾选回来,重新选择Team(开发团队)还是不行'帮助。我去了 xcode 项目 build settingsigning 部分,以确保 Code Signing 中的所有设置Identity 设置为 iOS developer.

我也试过了

ionic platform remove ios
ionic platform add ios

但我在执行 ionic build ios --release

时仍然不断收到上述签名错误

我不知道我现在还应该尝试什么..请帮忙。谢谢!!

PS:我的离子信息:

Your system information:

Cordova CLI: 8.0.0 
Ionic Framework Version: 3.9.2
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 3.1.7-201801172029
ios-deploy version: 1.9.2 
ios-sim version: 6.1.2 
OS: macOS
Node Version: v8.9.1
Xcode version: Xcode 9.2 Build version 9C40b

乔治

这很奇怪,但我只是将我的 iphone 与 mac 断开连接,所以 xcode 没有变化来检测连接的 iphone 而 运行离子构建 ios --release.

从平台中删除 ios 并重新添加是值得的。

ionic platform remove ios
ionic platform add ios

还值得取消选中自动管理签名,重新选中它,re-selected团队(开发团队)。并转到签名部分的 xcode 项目构建设置,确保代码签名身份中的所有设置都设置为 iOS 开发人员。