Mac Provisioning: Developer ID vs Development

I am working on a Mac app which works with iCloud KVS & CloudKit container of my iOS app which is already in production. All works fine when I run the app from Xcode directly. However, I need to Archive > Export and move it to the

/Applications
folder because it seems (?) that's the only way how the system picks up Safari Extension Companion. Otherwise, when running straight from Xcode or exporting just as a Mac app (without codesigning), safari.extension.companion always returns null in my extension code.


Now, on one hand, when exporting the app, I need to choose Developer ID codesigning as noted in Safari Extension programming guide.


On another hand, Developer ID doesn't support iCloud capability which is reserved for Development-codesigning and so I am supposed to export it as a Development build as noted in CloudKit programming guide.


But how do I export a build of my app including both of these capabilities?


When I export using Development codesigning, I can't launch the app due to the following crash:


unsatisfied entitlement com.apple.developer.icloud-container-environment
killed [pid] because its use of the com.apple.developer.icloud-services entitlement is not allowed (error -67050)


(Obv. I made sure that the provisioning profiles contan necessary iCloud capabilities).


Is it possible to distribute a test build with iCloud enabled outside of MAS at all? Or do I need to disable iCloud altogether when testing Safari Extension Companion (and for my external testers)?


If I turn off iCloud capabilities for my project, I can export and launch with both Developer ID and Development codesigning. However, safari.extension.companion is available in my Safari Extension code only when I export with Developer ID setting.

Mac Provisioning: Developer ID vs Development
 
 
Q