Confusion on OSX vs. CEF sandboxing

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Confusion on OSX vs. CEF sandboxing

Postby starkos » Sat Jul 05, 2014 7:56 am

Getting started with CEF again after a long time away. So much progress, wonderful work!

I am trying to turn on OSX code signing and app sandboxing, as I would to submit an app to the Mac App Store. I have things kind of working, but the information I've been able to find on the forums and wiki is a little confusing. I'm using the CEF 1750 binary distribution, Xcode 5, OSX 10.9, and working with the cefsimple demo.

In my .entitlements file I enabled App Sandbox and Outgoing Connections (network.client). I code sign the main app with my Developer ID via the usual Xcode settings, and sign everything else in a Run Script build phase, after building the additional helpers:

Code: Select all
codesign -f -s 'Developer ID:*' "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/Chromium Embedded Framework.framework"
codesign -f -s 'Developer ID:*' "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/libplugin_carbon_interpose.dylib"
codesign -f -s 'Developer ID:*' "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/${PRODUCT_NAME} Helper.app"
codesign -f -s 'Developer ID:*' "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/${PRODUCT_NAME} Helper EH.app"
codesign -f -s 'Developer ID:*' "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/${PRODUCT_NAME} Helper NP.app"


With this setup, the app crashes until I set
Code: Select all
settings.no_sandbox = YES;
Which makes me think that I'm working against CEF here.

So…am I going about this the right way? If so, there are some strange sandboxing warnings shown in the console at runtime, but I'll wait to ask about those until I know I'm doing things right. Thanks so much for any help or advice!
starkos
Techie
 
Posts: 18
Joined: Mon Jun 24, 2013 12:35 pm

Re: Confusion on OSX vs. CEF sandboxing

Postby magreenblatt » Mon Jul 07, 2014 11:38 am

starkos wrote:I would to submit an app to the Mac App Store.

You're unlikely to be successful with that. See viewtopic.php?f=6&t=11881.

starkos wrote:In my .entitlements file I enabled App Sandbox and Outgoing Connections (network.client)... With this setup, the app crashes until I set settings.no_sandbox = YES;

I don't know what "App Sandbox" requires, but it seems incompatible with Chromium's sandbox implementation.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Confusion on OSX vs. CEF sandboxing

Postby starkos » Tue Jul 08, 2014 9:37 am

Quite right; it looks like more work is needed, but that it can be done: https://groups.google.com/forum/#!topic ... P_x9Z0lEO4

I am going to finish porting my app over to CEF from Apple WebKit, and then I'll revisit this on the latest SVN code. I'll try applying the patch linked in that thread (https://github.com/trevorlinton/chromiu ... pport.diff) and report back.

Not getting into the MAS isn't a show-stopper for me, but it would be nice.
starkos
Techie
 
Posts: 18
Joined: Mon Jun 24, 2013 12:35 pm

Re: Confusion on OSX vs. CEF sandboxing

Postby charles » Thu Apr 09, 2015 6:32 am

Sorry to pick up this old thread again, but could you share your sign script + entitlements file you've used for this?
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 90 guests