19

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
Devid Farinelli
  • 7,514
  • 9
  • 42
  • 73
  • Check this question: http://stackoverflow.com/questions/39568005/xcode-8-shows-error-that-provisioning-profile-doesnt-include-signing-certificat/39633498#39633498 – Satish Mavani Nov 22 '16 at 09:48
  • 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 Dec 21 '16 at 16:27
  • 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 again – Devid Farinelli Dec 23 '16 at 07:58

5 Answers5

17

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.

zorro2b
  • 2,227
  • 4
  • 28
  • 45
  • This turned out to be my issue as well. Your answer solved it and should be marked as the accepted answer. – Christine May 03 '17 at 17:36
  • Solved my issue too! This is such a counter intuitive error :-/ – Felipe Ferri May 04 '17 at 14:09
  • 1
    Fixed my issue as well. Might be obvious for everybody else but with portal the Apple developer portal (https://developer.apple.com/account) is meant. Once logged go to 'Certificates, IDs & Profiles', at the bottom of the left menu you will see 'Provisioning Profiles', click on 'All' and there you will see the XC: * profile. After editing and generating I redownloaded the profiles in Xcode via Xcode - Preferences - Accounts - – Peter Eysermans Jul 25 '17 at 12:09
11

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

Norman
  • 3,020
  • 22
  • 21
  • 5
    This helped me as well. Unbelievable that this was the solution. – PeterK Sep 01 '17 at 16:11
  • 1
    OMG WTAF! Cheers! – J.C Oct 10 '17 at 10:34
  • doesn't work. after I updated to iOS 12 and XCode 10 automatic signing is broke. I can run the app directly on my iPhone 8 (connected with cable) and works perfectly fine. but when I try to archive the app for distribution the Profile is always NONE. I CAN manually sign the app and release it, but then the iCloud container is always missing from the profile. been struggling with this for days. how apple frustrates me with every update .. FFS does ANYONE know how to fix this. I've tried everything, even revoked and recreated all certs. and profiles. I NEED automatic signing and profiling. – Nexus Oct 08 '18 at 19:55
1

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.

Matt
  • 4,261
  • 4
  • 39
  • 60
0

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.

Parth Adroja
  • 13,198
  • 5
  • 37
  • 71
  • Hi, thanks for your help. I already had this configuration, the problem was that my app had a BundleID different from the one in my provisioning profile (i don't know why). – Devid Farinelli Nov 22 '16 at 11:55
0

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>
Lukas
  • 2,544
  • 2
  • 18
  • 33