4

I'm developing a Mac app, and preparing submit it to Mac AppStore.

I want distribute it on my website too, at the same time.

Since I use Sparkle framework to manage updates for the version outside AppStore, the app can NOT be sandboxed.

I know I can done this with multiple build targets, but keey two targets in sync is too heavy, since the only different is sandbox or not.

So I create a build configuration, and my configurations list like this:

  • Debug : for development, Sandbox Disabled
  • Release : for distributing outside Mac AppStore, Sandbox Disabled
  • MacAppStore : for distributing to Mac AppStore, Sandbox Enabled

How can I enable Sandbox only for MacAppStore configuration?

naituw
  • 1,087
  • 10
  • 14

1 Answers1

5

provide custom entitlement files for each build configuration. sandboxing is just a capability AFAIK.

entitlements file is a build setting and build settings can vary based on configuration

see screenshots for explanation

  1. shows where to manage configs.
  2. shows how I cleared the build setting for Release but left it for Appstore

enter image description here enter image description here

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135
  • Could you explain how to provide custom entitlement file for build configuration? I enabled App Sandbox in Capabilities, and Xcode add an .entitlement file to my project, how can I remove this file for Release configuration? – naituw Dec 29 '13 at 01:15
  • so use the capabilities page as normal and then see that xcode generates entitlements and sets those via the build setting 'code signing entitlements' – Daij-Djan Dec 29 '13 at 01:31
  • expand a build setting (triangle on the left of the setting) and modify it per config – Daij-Djan Dec 29 '13 at 01:32
  • don't forget that you'll likely have to clean build to get rid of old entitlements – Daij-Djan Dec 29 '13 at 01:33
  • Piece of cake. Brilliant answer! ;-) – Dr.Kameleon Nov 02 '14 at 07:38