19
votes

I'm testing my app with TestFlight but I can't upload my archives after updating to MacOS 10.12 and Xcode 8.1.

When I archive my app, click on "Upload to App Store...", select my Development, I get this error.

No matching provisioning profiles found for "Applications/app.app"

None of the valid provisioning profiles allowed the specified entitlements: application-identifier, beta-reports-active, keychain-access-groups.

What I've tried so far:

  1. Reopening Xcode (Many times)
  2. +, > select team > remove every provisioning profile > re-download every provisioning profile (Reopening Xcode after each step)
  3. Re-downloaded and installed my certificates and provisioning profiles
  4. Removing every provisioning profile and building the app
5
Just curious if you use two different machines. I think I may have run into this same problem today. What was your solution? Did you remove the bundle in iTunes Connect and recreate that or do something locally on Xcode?Douglas Taggart
Hi, I'm using Ionic on one machine to develop an app, for an unknown reason the bundleID in config.xml was the default one i.e. my.ionic.project that was different from the one I set in iTunes Connect. I just edited that configuration and built it againDevid Farinelli

5 Answers

17
votes

I had this same error when my Xcode wildcard profile expired. Xcode didn't automatically renew it even though everything was set to automatic.

I logged in to the the portal, edited the XC: * profile, hit generate and then downloaded the resulting certificate. All good after that.

11
votes

On Xcode's Capabilities screen, turning a capability On and then Off will fix the issue.

1
votes

None of the other answers worked for me.

I had to delete all certificates from KeyChain, and also revoke them in Apple Developer portal. Then manually request a Distribution certificate in KeyChain. Upload it to the Developer portal.

XCode (8.3) must be stopped because it keeps creating certificates as they are being deleted from KeyChain.

Also, KeyChain burped and suddenly had a whole bunch of certificates and keys that it wasn't showing before. I don't know why that happened. Some were expired, which may have been causing the original problem. I deleted them all too.

Finally, XCode was happy to Archive, and Upload to iTunes. Only two hours wasted this time.

0
votes

Use the automatic option provided in Xcode just add the relevant account team in the Xcode and let Xcode manage the signing process. Then go for Archive and select proper options while making archiving.

0
votes

I was running into the same issue. As our project was automatically generated by Ionic and had to be build in a CI environment, opening the project and toggle automatic signing wasn't an option. I did a diff of the entitlements file before and after the toggle and found out that the dict value was sorted differently:

 <!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>production</string>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
    </array>
-   <key>aps-environment</key>
-   <string>production</string>
 </dict>
 </plist>

Even though from my understanding it shouldn't make a difference, the build was successfull after this change.

For everyone running into this in an Ionic project, the solution was to add this key-value pair to the config edit in the config.xml:

<config-file parent="keychain-access-groups" target="*-Release.plist">
    <key>aps-environment</key>
    <string>production</string>
    <array>
        <string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
     </array>
</config-file>