Hello,
I archive my macOS app and Xcode can create it successfully, however when I validate the archive there are 2 errors:
- Cloud signing permission error (You haven't been given access to cloud-managed distribution certificates. Please contact ...).
- 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?
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.