Exporting Development-Signed application not working

In Xcode7 there's a new option when exporting your app called "Export a Development-signed Application" (note: NOT developer-ID signed). This should save a copy of the application signed with your development identity. Essentially, in other words, this is what you need to use when distributing for Adhoc. The following article says the same: https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/BetaTestingYourMacApp/BetaTestingYourMacApp.html#//apple_ref/doc/uid/TP40012582-CH34-SW1 (Exporting Your App for Testing)

Having said that, when I try using this option and then try launching the app, it just fails a with a EXC_CRASH (Code Signature Invalid). I don't understand why - I'm trying this on my development machine and it should work fine.


codesign -vv ./MyApp.app says:


MyApp.app: valid on disk

MyApp.app: satisfies its Designated Requirement


However spctl fails:


spctl --assess -vvvv ./MyApp.app: rejected

origin=Mac Developer: Some Developer (EWR3452WR)


The packaged entitlements look okay too, and I don't see why it would not work. The app uses iCloud, CloudKit and MapKit (all App Store only technologies) and I understand it results in a code sign crash at runtime when using with a 'Developer-ID signed bundle' but here I'm using my own Development certificate.


Please help!

I’m not sure what’s going on here but the first thing I’d do is remove entitlements from the equation. Create a simple test app with no store-only entitlements (or temporarily strip the entitlements out of your main app) and then see what happens.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I eventually gave up as it seems it was unhappy about this:


illed com.mycomp.app [pid 28331] because its use of the com.apple.developer.icloud-container-environment entitlement is not allowed


But why not? I'm using my Development profile (i.e. Adhoc beta testing as per your documentation as well) and I saw that Xcode added a this entitlement with the value 'Development', which should be allowed outside the store as long as I'm signing with my Development ID (note: not 'Developer ID', but instead my Mac Developer profile).


This is quite frustrating. Our app uses CloudKit and I need to be able to beta test it. We can't seem to! Finally if I export as 'as a Mac Applicaiton', this works but then spctl says:


MyApp.app: rejected

origin=Mac Developer: SomeDeveloper (SomeID)


Aaargh. When I hand this over to our beta testers, they say the app won't install until they switch off gatekeeper.


Why Apple, why! Do you no longer test these frameworks with all the neat testing suites added to xcode? Completely baffling that while iOS developers keep getting better and better tools and easier workflows, Mac developers are 3rd class citizens with a spat of codesigning issues if they wish to SUPPORT the Mac App Store by building Mac App Store Only apps, but then fail when they try and test these apps using Adhoc/Developer builds.

I'm also seeing this; re-signing added one new entitlement embedded in the binary itself:com.apple.developer.icloud-container-environment. Because of that entitlement, the app is killed upon launch.


I've filed radar://24383404 on the issue.

Hi - checking in to see if there was ever any progress on this issue??


I'm experiencing something similar, but not sure if it's exactly the same thing. I have a macOS app that uses CloudKit, and I want to be able to test it on another machine against the development CloudKit container. I'm exporting using Development (not Developer ID). This generates an .app file that works on my development machine, but cannot be deployed/tested elsewhere.


Same thing?

Exporting Development-Signed application not working
 
 
Q