Ionic **构建失败** 在iOS 10.1 SDK中,“应用程序”产品类型需要代码签名。

13

当我运行ionic run ios --device时,构建失败了。几天前它还正常工作,现在我却遇到了这个错误。如何解决?我已经搜索了解决方案,但都没有起作用。

下面是错误信息:

   === BUILD TARGET SoftApp OF PROJECT SoftApp WITH CONFIGURATION Debug ===


Check dependencies

Signing for "SoftApp" requires a development team. Select a development team in the project editor.

Code signing is required for product type 'Application' in SDK 'iOS 10.1'



** BUILD FAILED **



The following build commands failed:
        Check dependencies
(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/amitabhs/Projects/SoftApp/SoftAppcc/Mobile/SoftAppIonic_cc/platforms/ios/cordova/build-debug.xcconfig,-project,SoftApp.xcodeproj,ARCHS=armv7 arm64,-target,SoftApp,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/amitabhs/Projects/SoftApp/SoftAppcc/Mobile/SoftAppIonic_cc/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/amitabhs/Projects/SoftApp/SoftAppcc/Mobile/SoftAppIonic_cc/platforms/ios/build/sharedpch

我尝试过卸载并重新安装IOS、Cordova和Ionic,但仍然没有帮助。

以下是我的配置:

    Your system information:

Cordova CLI: 6.3.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v4.5.0
Xcode version: Xcode 8.1 Build version 8B62 

你能用Xcode在手机上运行这个项目吗? - chefjuanpi
@Pablote 我用Xcode试了一下,还是显示同样的错误。 - Amitabh Sarkar
日志显示密钥权限存在问题,可能是手机的问题,因为谈到开发团队时,手机可能已经注册到不同的开发团队。或者机器没有注册开发团队。您能在Xcode中选择开发团队吗? - chefjuanpi
@Pablote 谢谢你的帮助,你是正确的,IOS团队预配文件已经过期了。 - Amitabh Sarkar
2个回答

5

我找到了解决方案,

事实上问题出在Xcode而非ionic上, 我在这里找到了解决方案。


我有同样的问题。我跟随了你提供的链接,但是你是采用哪个解决方案呢? - GY22
这个跟编程有关的内容已经解决了我的问题。如果能够起作用,请你给它点个赞。谢谢。 - Amitabh Sarkar

1
用xcode打开你的.xcodeproj文件。
你可以在这里找到它:project_directory/platform/ios/project_name.xcodeproj 然后在左侧的项目树中选择根文件。
现在,在Signing部分,确保已选中Automatically manage signing。作为最后一步,您可以选择一个团队。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接