How can we test ios release app. in device with wildcard provisioning profile

955 Views Asked by At

Currently, I have following config in my Xcode.I am trying to test app. Directly in device with Notification enabled i.e APNS

i) Code Signing Identity as "iPhone Distribution" ii) Provisioning profile as Wildcard

Question 1 : Can I install through iTunes directly in my device after archieving ?

Question 2 : Will WildCard provisioning profile create release/debug build ? Does this wildcard concept have anything to do the release/debug ?

Question 3 : Without Testflight, is there any way where I can test my app. in release mode directly in device ?

Help is appreciated ! I am stuck here.

2

There are 2 best solutions below

0
On

The answer is pretty simple:

Whatever you export/release you App with the Distribution profile, it will count as "Distribution", thus, it will match the production APNS certificate in your sender. Regardless how do you install or download the ipa.

e.g. TestFlight.

Otherwise, if you export/release/share your App using the Developer profile, it will count as "Developer" so you may use the Sandbox Developer APNS certificate in your sender.

e.g. You install the App in your phone trough XCode.

You should not use a Wildcard provisioning/certificate.

So pay attention to the signing of the App, that will give you the clue about which certificate you need to pair with.

I do this frequently and I switch my certificate in the Push Notifications sender (the one should match the APNS certificate) back and forward.

Let me know if you need further clarification.

Question 3. You can test Push Notifications in all possible case scenarios, Ad-Hoc, iTunes, TestFlight, direct install, you just need to pay attention to the certificate using for exporting/installing the App and sign it properly (as I just said).

Happy coding!

APNS Certificate for Developing Mode

0
On

A provisioning profile for a wildcard App-ID does not give the Apple Push Notification entitlement.

You need:

  1. An app with the aps-environment entitlement set to production. If you want to test with the APNS sandbox environment this should be set to development.
  2. A provisioning profile for your App-ID that includes the permission to install apps with the aps-environment entitlement set.
  3. A code siging certificate and private key that is included in the provisioning profile.

To check an apps entitlements you can run the following command:

$ codesign -d --entitlements :- path/to/Payload/MyApp.app/MyApp
....
    <key>aps-environment</key>
    <string>production</string>
....

To check the entitlements in a provisioning profile I find it easiest to open the profile in TextEdit.app (drag the file to the dock icon) and search for “Entitlements”.

The setting for the code signing certificate can be checked at the Apple developer member center.