Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

MacOS Archive Validation Error - Xcode couldn't find any Mac App Store provisioning profiles matching app bundle identifier

Hello,

I archive my macOS app and Xcode can create it successfully, however when I validate the archive there are 2 errors:

  1. Cloud signing permission error (You haven't been given access to cloud-managed distribution certificates. Please contact ...).
  2. No profiles for 'my app-bundle-identifier' were found (Xcode couldn't find any Mac App Store provisioning profiles matching 'my app-bundle-identifier'.).

I have added my Apple ID account in Xcode and enable "Automatically manage signing" option for signing my app target, and Xcode can build the target successfully without any problem with certificates or provisioning profiles when archive.

I have some components (frameworks, daemon, xpc services, share extension) which are put in Frameworks, Resources, XPCServices, PlugIns folders in app's Content, and use post build script to manually code sign for all of these components by ${CODE_SIGN_IDENTITY}, and Xcode can sign those components without any problems when building for archive.

I already created Mac App Distribution and Mac Installer Distribution, and macOS App Store profile for my app-bundle-identifier.

I don't understand why Xcode still reports the error regarding Mac App Store provisioning profiles when I validate the archive and can't figure out how to fix the issue because I have enabled "Automatically manage signing" so that Xcode can automatically select the appropriate profiles when it archives the app.

Any suggestion for how to fix the issue?

Answered by DTS Engineer in 835622022
use post build script to manually code sign for all of these components

Manually signing code in a build script is not a great option when you’re using automatic code signing. Those two features generally don’t play well together because your build script isn’t run when you click Distribute App in the Xcode organiser.

Also, the types of components you’re embedding (“frameworks, daemon, xpc services, share extension”) are all things that Xcode’s automatic code signing should be able to cope with [1]. So I’m surprised you need this build script at all.

However, it’s not clear to me whether these issues are tied to the main issue you’re reporting here. Given that, I recommend that you separate the two concerns by creating a small test project that has the same bundle ID as your main project. Are you able to Product > Archive and then Validate App on that?

If so, we can explore what’s different about your main project. But if your test project also fails then the structure of your main project is not a concern and we can focus on your signing issues.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Assuming you’re placing them in reasonable locations, per Placing Content in a Bundle.

use post build script to manually code sign for all of these components

Manually signing code in a build script is not a great option when you’re using automatic code signing. Those two features generally don’t play well together because your build script isn’t run when you click Distribute App in the Xcode organiser.

Also, the types of components you’re embedding (“frameworks, daemon, xpc services, share extension”) are all things that Xcode’s automatic code signing should be able to cope with [1]. So I’m surprised you need this build script at all.

However, it’s not clear to me whether these issues are tied to the main issue you’re reporting here. Given that, I recommend that you separate the two concerns by creating a small test project that has the same bundle ID as your main project. Are you able to Product > Archive and then Validate App on that?

If so, we can explore what’s different about your main project. But if your test project also fails then the structure of your main project is not a concern and we can focus on your signing issues.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Assuming you’re placing them in reasonable locations, per Placing Content in a Bundle.

Thanks for your response.

I create a very simple macOS app using the default project template and try to validate the archive but Xcode shows the same errors so I don't think this issue relates to my embedded components.

Please see the attached file for the error log from the file "IDEDistribution.verbose.log", and I'm using Xcode 16.0.

I already create the 'Mac App Store Connect' provisioning profile for my test app's bundle identifier, but I'm not sure how Xcode finds this profile. Can Xcode automatically find it by using my AppleID account in Accounts settings?

I create a very simple macOS app using the default project template

Just to confirm:

  • In Signing & Capabilities, the Team popup is set to the team you’re using in your main app.

  • Likewise, the Bundle Identifier field is also set to that of your main app.

  • And “Automatically manage signing” is checked.

Is that correct?

Please see the attached file for the error log from the file IDEDistribution.verbose.log

It’s help if you posted logs as text rather than as images. See tip 6 in Quinn’s Top Ten DevForums Tips

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Regarding the issue when validate the simple macOS app, the errors have gone if I perform Custom Validate and manually select the AppStore profile.

I stop using the post script to copy my embedded components into the app's Contents and use Copy Files phase to put those components in the appropriate Destination folder instead, and I can validate and distribute my app successfully. However after uploading to AppStore Connect by Xcode, I receive an email from Apple with the error "The executable 'myApp.app/Contents/SharedSupport/BaseResources.bundle' must be signed with the certificate that is contained in the provisioning profile.".

I have a loadable bundle (BaseResources.bundle) which contains some resources such as data files and localizable strings, which are used in my main app, and it does not contain any executable codes so I have removed the CFBundleExecutable key in its Info.plist to avoid an error when validating. I set the same bundle identifier as my main app for my BaseResources bundle target and put it in 'Shared Support' destination in Copy Files phase of my main app's target. When turn on 'Automatically manage signing' I can see that Xcode sets 'Development' for Signing Certificate rather than 'Apple Development'. Is it why Apple reports such code signing error? But if I try to manually set 'Apple Development' for Signing Certificate, I see the same error report from Apple after distributing.

I'm not sure how to correctly configure for my non-executable loadable bundle so that App Store Connect can sign it correctly. Should I change its bundle identifier not to be the same with my main app or should I put in different folder than "Shared Support" etc...?

Please advise, thanks.

Well, you certainly seem to be making progress. Cool!

If BaseResources.bundle contains no code, I recommend that you put it in Contents/Resources. That’s the best place for storing data, per the rules in Placing Content in a Bundle.

Note The state of Contents/SharedSupport is… well… confusing. When I originally wrote Placing Content in a Bundle I did some research into the semantics of that location but I wasn’t able to drive that to a conclusion. Rather than delay the doc further, I just left it out. Since then I’ve not got back to this, and it seems that no one else has either. At this point my general advice is for you to avoid that location entirely.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

MacOS Archive Validation Error - Xcode couldn't find any Mac App Store provisioning profiles matching app bundle identifier
 
 
Q