0

Firstly, I'm building my app through the command line- unfortunately this is necessary since I'm using Azure DevOps to do the build.

Since the app has an extension I created two provisioning profiles (the app's has Push Notifications capability) and build and sign the ipa via a plist file (multi-provisioning-profiles.plist) as follows:

xcodebuild -sdk iphoneos -configuration Release -project myapp.xcodeproj -scheme MyApp archive -archivePath myapp.xcarchive CODE_SIGNING_ALLOWED=NO

xcodebuild -sdk iphoneos -configuration $(Configuration) -project myapp.xcodeproj build -exportArchive -archivePath myapp.xcarchive -exportOptionsPlist multi-provisioning-profiles.plist -exportPath /ipa

The ipa then successfully uploads and a short while later I get the error email from Apple regarding push notification entitlements.

Any idea what I might be missing here?

For completeness, here's the multi-provisioning-profiles.plist file also:

<dict>
    <key>provisioningProfiles</key>
    <dict>
        <key>[My app key]</key>
        <string>[UUID of app's prov profile]</string>
        <key>[My extension key]</key>
        <string>[UUID of extension's prov profile]</string>
    </dict>
    <key>signingCertificate</key>
    <string>iOS Distribution</string>
    <key>signingStyle</key>
    <string>manual</string>
    <key>method</key>
    <string>app-store</string>
    <key>teamID</key>
    <string><[My team ID]</string>
</dict>
</plist>
bcl
  • 478
  • 1
  • 5
  • 16

1 Answers1

0

The problem seemed to stem from not signing the archive (CODESIGNINGALLOWED=NO is bad in this case). Once the xarchive was signed with the provisioning profiles then I no longer received the email from Apple after uploading.

I'd originally avoided signing the archive because I'd struggled to get it working with more than one provisioning profile but eventually found the following solution: https://stackoverflow.com/a/29605731/2520623

For reference, this is what my final archive command looked like:

xcodebuild -sdk iphoneos -configuration Release -project myapp.xcodeproj -scheme MyApp archive -archivePath myapp.xcarchive -allowProvisioningUpdates OTHER_CODE_SIGN_FLAGS=--keychain tempkeychain.keychain APP_PROFILE=[UUID of app's prov profile] EXTENSION_PROFILE=[UUID of extension's prov profile]
bcl
  • 478
  • 1
  • 5
  • 16