【问题标题】:Unable to build Ionic / Cordova iOS due to an issue with the entitlements file or provisioning profile由于权利文件或配置文件存在问题,无法构建 Ionic / Cordova iOS
【发布时间】:2017-06-27 23:49:56
【问题描述】:

在尝试构建我的 Ionic 应用的 iOS 版本时,它一直失败并显示以下消息

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

Check dependencies

Automatic signing is unable to resolve an issue with the "tlpApp" target's 
entitlements file. Remove the entitlements or switch to manual signing and 
resolve the issue by downloading a provisioning profile from the developer 
website.

Provisioning profile "iOS Team Provisioning Profile: com.ionicframework.tlpapp360156" 
doesn't include the aps-environment entitlement.

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

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

** ARCHIVE FAILED **

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

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/kenkern/Workspaces/tlp/tlp2/tlp-ionic/platforms/ios/cordova/build-debug.xcconfig,-workspace,tlpApp.xcworkspace,-scheme,tlpApp,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,tlpApp.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/kenkern/Workspaces/tlp/tlp2/tlp-ionic/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/kenkern/Workspaces/tlp/tlp2/tlp-ionic/platforms/ios/build/sharedpch

运行“ionic build ios”或“cordova build ios”命令时会出现此消息。我可以很好地模拟应用程序(“离子模拟 ios”)。当我尝试将 XCode 构建到实际设备(例如连接到我的 Mac 的 ipad)时,我也会在 XCode 中收到相同的消息。

首先,我不确定我是否理解“删除权利”或“切换到手动签名并通过从开发者网站下载配置文件来解决问题”的含义。

我有一个更大的问题是,为什么当我从他们的模板创建一个简单的 Ionic 应用程序时,我能够很好地构建到 iOS?

ionic start cutePuppyPics --v2
cd cutePuppyPics
ionic build ios --prod

【问题讨论】:

  • 你解决过这个问题吗?我正在解决这个问题。似乎因为我正在使用推送,所以自动签名不起作用(尽管它正在为另一个项目工作,因为在某个地方为它创建了一个特定于应用程序 ID 的团队配置文件)。看来,即使我在 build.json 中指定配置文件 GUID,cordova 仍然会创建启用自动签名的项目。

标签: ios cordova ionic-framework ios-provisioning code-signing-entitlements


【解决方案1】:

如果您在 phonegap 或 ionic 项目上使用推送通知,请确保在 capabilites 上启用推送通知。

【讨论】:

    【解决方案2】:

    从 Cordova v7.0.1 开始,我经常遇到此问题(仅在使用 build 命令指定 --release 时,并且仅在 iOS 中)。

    我的(不理想的)解决方案如下:

    1. 打开 Xcode 项目
    2. 取消选中Automatically manage signing
    3. 从下拉列表中选择符合条件的调试配置文件
    4. 从下拉列表中选择符合条件的发布配置文件
    5. 运行cordova build ios --release
    6. 重新检查Automatically manage signing(用于归档项目并发送到iTunesConnect)

    【讨论】:

      猜你喜欢
      • 2017-03-13
      • 2016-06-03
      • 2017-06-20
      • 2014-05-30
      • 2013-03-03
      • 1970-01-01
      • 1970-01-01
      • 2021-01-09
      • 2011-08-02
      相关资源
      最近更新 更多