Ionic.io 2, Apple Application Loader, Missing Code-Signing Certificate

777 Views Asked by At

I'm using Ionic.io to build an Ionic 2 project and generate an .ipa (for upload to Apple's TestFlight).

When I try to upload my development .ipa file using Apple Application Uploader I get the following error:

Invalid Provisioning Profile. The provisioning profile included in the bundle xxx.xxx.xxxx [Payload/xxx.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."

The .ipa file is being generated by ionic.io

Ionic.io security profiles and certificates have been created as per instructions here (have tried on both Windows and Mac): http://docs.ionic.io/services/profiles/

I've reviewed the document many times and have created keys multiple times (in case something was missed).

I'm building development with the following command. My understanding is we don't want to use "--release" because that's only for the production profile. In fact, the ionic.io package fails to build if this parameter is specified for dev.

ionic package build ios --profile dev

Push notifications are not enabled.

I posted this to the Ionic2 forum too but there has been no resolution.

Has anyone got this to work or have any ideas?

2

There are 2 best solutions below

3
On BEST ANSWER

You need a mac to sign your app with a Provisioning Profile

First Build your app

ionic build ios

Then Open your app with Xcode. you can find the the project in your xcode project

ionicProject > platforms > iOS > ionicProject.xcodeproj

You need to make sure your Xcode account is setup

Click on Xcode > Preferences... > click on the plus sign

once your account is linked and you have downloed all your Provisioning profiles you can click on your project on the left

and under General you can add your Provisioning Profile below signing

0
On

This answer adds additional detail to LeRoy's answer. Because ionic.io is currently broken, the work around is to use a Mac to generate the .ipa. Note that this successfully generates a "debug" .ipa. But the steps should be similar to generate a release .ipa.

  1. Needed a mac in a hurry so signed up for a macincloud.com account which came pre-installed with Xcode version 8.2.1.

  2. Setup iOS security profiles as per ionic.io documentation here: http://docs.ionic.io/services/profiles/. The documentation steps are clear. I followed all steps including adding profiles to ionic.io. I was able to create using Windows and Mac. Ultimately I decided to use the Mac generated security profiles (but I don't think this mattered).

  3. Copied my entire Ionic 2 project to the Mac.

  4. Ran on cmd line: ionic resources

  5. For safety, ran on cmd line: ionic platform remove ios and then ionic platform add ios.

  6. Ran on the cmd line: ionic build ios This generates an xCode project.

  7. Open Xcode application. Choose open another project and select file: /platforms/ios/[project].xcodeproj

  8. Open Xcode. In preferences > accounts added my apple account and clicked the download button.

    enter image description here

  9. Select Generic iOS Device

    enter image description here

  10. Select Generic iOS Device

  11. In project settings > Targets > General tab: checked Automatically manage signing and selected my profile from drop down. Sometimes I had to check/uncheck this to force it to work.

  12. Xcode complained about a signing mismatch. In project settings > Targets > Build Settings tab: change Code Signing Identity to iOS Developer. Sometimes I had to add/remove the ios platform again to get around this error.

    enter image description here

  13. Xcode menu Product > Archive. Followed prompts to upload to iTunes.