I am trying to make a sandboxed and a nonsandboxed version of my Mac 
application so that I can sell a version in the Mac App Store but also sell a 
version on my website. I have created different targets in my project for this. 
I thought this was working OK, but I recently noticed that my target with 
sandboxing turned off still seems to be building a sandboxed application. My 
URLForDirectory call to get the Application Support folder is returning the one 
in Containers/<my-bundle-identifier>/Data. The built application contains an 
archived-expanded-entitlements.cent file. And code I have in this target to 
move the application into the Applications folder fails because of sandboxing. 
It worked when I first added it, which is when I turned off sandboxing for that 
target.

I was able to get it non-sandboxed again by turning sandboxing on and back off 
again, for that target. Unfortunately, doing that removed keys from my 
entitlements file. This then broke my sandboxed version.

I think the problem is that both targets are using the same entitlements file. 
I tried removing the entitlements file from the target membership of the non 
sandbox target, but that seems to be ignored. (In fact, before I looked at it, 
it wasn’t in the membership of any of either target.) I also checked my build 
phases, and the entitlements file is only listed under Copy Bundle Resources in 
the sandboxed target, but this seems to be ignored too.

Any hints on how to solve this?

David
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to