0
votes

Apple keeps sending me this mails, when I try to upload my app to TestFlight

Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

I am trying to use Push Notifications.

My App ID looks like this.

My Provisioning profile is set up to use that App ID.

So what could I have done wrong? And how can I check, if XCode is using the right Provisioning profile?

EDIT I am using Xamarin Studio, so I have to set the profile correctly in XCode

2

2 Answers

1
votes

Get a developer build

Get your developer to give you the .IPA file that is signed using their normal “iPhone Developer” key. They do this all the time to test the app on physical devices they own

Get your tools in order

You will need the following:

  1. A “Mobile Provisioning Profile”
  2. An “Entitlements.plist”
  3. An “iOS Distribution Certificate”
  4. iReSign OS X app (or you could use command line)

1. Mobile Provisioning Profile

Download (or create then download) this from the “iOS Provisioning Profiles”inside of Apple Developer Members Center.

enter image description here

2. Entitlements Plist

You will actually need to make this yourself. You will need two values to make the strings required. You need the App ID Prefix and the Bundle ID. You can find them in Members Center “Certificates, Identifiers & Profiles”

Open your favorite text/code editor and drop this in. Then update the two values in the following code and save it as “entitlements.plist”.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>development</string>
    <key>get-task-allow</key>
    <false/>
</dict>
</plist>

If you are NOT using Push Notifications, you need to remove the two lines:

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

3. iOS Distribution Certificate

You should have this installed already. If not, you can get it installed via Xcode or Member Center.

  1. Xcode > Preferences > Accounts
  2. Find or add your Apple ID and click “View Details”
  3. ”+” “iOS Distribution” (or iOS Development) and then Refresh (bottom left)
0
votes

Have you tried explicitly setting the Provisioning Profile that you want Xcode to use?

enter image description here

Instead of having "XC:*" there, specify the exact provisioning profile that you want Xcode to use when signing your build for App Store upload.