Hi, I know my swiftui, but I'm completely new to macOS development. Using Xcode 16.2 I wrote a backup app that fits my needs. I got it to use iCloud Documents in its own container. It runs beautifully on my developing Mac.
When I copy it over to my other Mac and try to open it, I just get a message that macOS can't open the app ("Das Programm kann nicht geöffnet werden")
In terminal I get this message: "embedded provisioning profile not valid: file:///Users/niko/FlexBackup.app/Contents/embedded.provisionprofile error: Error Domain=CPProfileManager Code=-212 "Provisioning profile does not allow this device."
I have "automatically manage signing" turned on and a Xcode Managed Profile.
How can I run my app on all of y Macs?
Access to iCloud is gated by restricted entitlements, that is, entitlements that must be authorised by a provisioning profile. A development profile is limited to a specific set of devices, which is why you’re seeing this error. To learn more about how this works, see TN3125 Inside Code Signing: Provisioning Profiles.
As to what you should do about this, that depends on what your distribution plan is:
-
If you’re just running a simple test on that other Mac, add its provisioning UDID to your development profile.
-
If you want to give your app to testers and eventually plan to distribute it via the App Store, engage with TestFlight.
-
If you plan to distribute your app directly, export a Developer ID signed version and notarise that. See Creating distribution-signed code for macOS, Packaging Mac software for distribution, and Notarizing macOS software before distribution.
IMPORTANT If you go down the Developer ID path, see The Care and Feeding of Developer ID.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"