3

When trying to build the iOS version of my Ionic app, it keeps failing with the following message

=== 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

This message occurs when running the "ionic build ios" or "cordova build ios" command. I can emulate the app just fine ("ionic emulate ios"). I also get the same message in XCode when I try to build it to an actual device (like an ipad connected to my mac).

First, I am not sure I understand what it means to either "remove the entitlements" or "switch to manual signing and resolve the issue by downloading a provisioning profile from the developer website".

The bigger question I have is why I am able to build to iOS just fine when I create a simple Ionic app from their template like such?

ionic start cutePuppyPics --v2
cd cutePuppyPics
ionic build ios --prod
Ken
  • 53
  • 1
  • 8
  • Did you ever solve this? I am hitting this issue. It seems that because I am using push, the automatic signing isn't working (though it is working for another project because somewhere along the way a app id specific team provisioning profile was created for it). It also seems that, even if I specify provisioning profile GUIDs in build.json cordova still creates the project with automatic signing enabled. – Austin France Oct 20 '17 at 09:50

2 Answers2

0

As of Cordova v7.0.1, I experience this issue on a regular basis (only when specifying --release with the build command, and only with iOS).

My (not ideal) solution has been the following:

  1. Open the Xcode project
  2. Uncheck Automatically manage signing
  3. Select an eligible debug provisioning profile from the dropdown
  4. Select an eligible release provisioning profile from the dropdown
  5. Run cordova build ios --release
  6. Re-check Automatically manage signing (for archiving the project and sending to iTunesConnect)
Chris Voth
  • 853
  • 5
  • 13
  • 22
0

If you're using push notifications on phonegap or ionic projects, be sure if the push notifications are enable on capabilites.

Alfredo Luco G
  • 876
  • 7
  • 18