1

I'm building an iOS application from the commandline and then using xcrun to sign/embed the mobile provision.

When I run from the GUI I see what is expected, and I am able to gather the device token for push notifications: The embedded profile in Payload/appname.app/embedded.mobileprovision shows the following information:

<key>aps-environment</key>
<string>production</string>

When i run a codesign -d --entitlements on the app payload, I see the following:

<key>aps-environment</key>
<string>production</string>

When I run from the command line, I see the same thing in the embedded provision, but the output of the codesign --entitlement no longer shows the aps-environment. The commands I'm using for the command line builds are as follows:

/usr/bin/xcodebuild -configuration Distribution clean build
/usr/bin/xcrun -sdk iphoneos PackageApplication "path-to-the.app" -o "file.ipa" --sign "iPhone Distribution: My Name" --embed "path-to-the.mobileprovision"

The error I see from the device is:

No valid 'aps-environment' entitlement string found for application 'appname': (null). Notifications will not be delivered.

What am I doing incorrectly from the commandline compared to the GUI?

user1116933
  • 469
  • 7
  • 14
  • http://stackoverflow.com/questions/5681172/bundle-identifier-and-push-certificate-aps-environment-entitlement-error See if the answer to this question helps, though the answer's link to apple documentation is now a redirect and not the original link. – rezand Jul 03 '13 at 03:47
  • Unfortunately that question did not provide any new information. I did discover however, that this was caused by incorrect code signing entries. The code signing entry was still the ID of the wildcard provisioning file, and not the new app specific provisioning file. – user1116933 Jul 04 '13 at 02:31
  • Gotcha, I guess I over thought the issue at least you figured it out. – rezand Jul 04 '13 at 02:34

0 Answers0