Bug 16512 - App sandbox not enabled error when submitting App to store
Summary: App sandbox not enabled error when submitting App to store
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.6.19
Hardware: Macintosh Mac OS
: High normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2013-11-29 06:21 UTC by Mike James
Modified: 2014-09-26 12:34 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mike James 2013-11-29 06:21:03 UTC
A customer is having issues submitting an App to the App store as he is constantly getting the following email from Apple: 

Dear developer,

We have discovered one or more issues with your recent delivery for "AppName".
To process your delivery, the following issues must be corrected:

App sandbox not enabled - The following executables must include the
"com.apple.security.app-sandbox" entitlement with a Boolean value of true
in the entitlements property list. Refer to the App Sandbox page for more
information on sandboxing your app.

It looked like it might be related to this: 
http://forums.xamarin.com/discussion/10511/embedded-provisioning-profile-not-valid/p2

I had the customer download the release the Jeff posted but this didn't resolve the issue. I have taken the customers project and creating provisioning profiles myself and been able to upload to the App store with no issues. 

As this release didn't work, I had the customer revert to a previous version of Xamarin Studio to see if this would help and he still gets the same error. 

Any advice on how to continue helping the customer would be greatly received as he urgently needs to deploy his App and I cannot reproduce the problem.
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2013-12-02 13:04:24 UTC
## Latest version information from the customer

Xamarin.Mac 1.6.19
Xamarin Studio 4.2.1
OS X 10.8.5
Xcode 5.0.2
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2013-12-05 20:29:31 UTC
Workaround that seems to have resolved the "App sandbox not enabled" problem: manually re-sign the app after removing the `keychain-access-groups` entry from the .xcent file.

> export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"

> codesign -f -s "3rd Party Mac Developer Application: Company Name" --resource-rules=MyApp.app/Contents/ResourceRules.plist --entitlements "MyApp.xcent" MyApp.app


On my computer, I didn't need to set the `CODESIGN_ALLOCATE` variable, but on the customer's computer this was required to avoid an "object file format unrecognized, invalid, or unsuitable" error. Perhaps that's related to why the bug-fix version of Xamarin Studio from the forums [1] didn't resolve the problem?

> [1] http://forums.xamarin.com/discussion/10511/embedded-provisioning-profile-not-valid


Manually re-signing the app revealed a second, separate problem where the app was exiting during launch because it was using some features incompatible with the App Store sand box (reported in the Console logs). This behavior might also partly explain why the bug-fix version of Xamarin Studio seemed not to work.
Comment 4 Chris Hamons 2014-09-26 12:34:25 UTC
Fixed in xamcore master/05ec941177fb5aaeb21fe388f91f94a038638118

This will arrive in a future release of Xamarin.Mac.