Re: Sandboxed and non-sandboxed targets
Re: Sandboxed and non-sandboxed targets
- Subject: Re: Sandboxed and non-sandboxed targets
- From: David Durkee <email@hidden>
- Date: Mon, 14 Dec 2015 14:39:54 -0600
I may have found the answer. Under Build Settings for the target, in the Code Signing section, Code Signing Entitlements was still pointing to the entitlements file. When I removed it for the nonsandbox target, it seemed to solve the problem. Both targets are building as expected now.
David
> On Dec 14, 2015, at 2:18 PM, David Durkee <email@hidden> wrote:
>
> 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@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden