Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Oct 16, 2018 9:02 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Debugging sandbox app
PostPosted: Tue Nov 13, 2012 4:52 pm 
Offline
User avatar

Joined: Mon Dec 11, 2006 12:25 pm
Posts: 73
Is there any simple way to debug an app to make it sandbox compatible?

I have pre-sandbox app. Works likes typical app where it stores preference file, lets user open/save/import/export files, use the camera, print, and it uses SQLite for it's main data file.

I build for cocoa, sign it, run it, log in with my sandbox itunes account... then the app crashes.

I can put up alert boxes to try to figure out where the crashes are happening, but is it possible to debug it with the RB debugger?

_________________
http://www.catamount.com
PocketMoney for iOS, OSX, Linux, Windows, and Android
Realbasic developer chat ##rb on irc.freenode.net


Top
 Profile  
Reply with quote  
 Post subject: Re: Debugging sandbox app
PostPosted: Tue Nov 13, 2012 5:10 pm 
Offline
Site Admin
User avatar

Joined: Tue May 06, 2008 1:07 pm
Posts: 1464
Location: NotEvenOnTheMap, CT
Use build automation. A post-build IDE script step will do the job nicely:
dim app as string = CurrentBuildLocation + "/""" + CurrentBuildAppName + ".app"""
call DoShellCommand("codesign -f -s ""My Company Name"" --entitlements ""$PROJECT_PATH/../Build/Mac/Sandbox.entitlements"" """ + app + """")
You will of course have to change the name of the certificate you wish to use, and adjust the path to the entitlements file. But if you have it setup correctly, your debug builds will be signed and sandboxed automatically before being launched.

_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Debugging sandbox app
PostPosted: Tue Nov 13, 2012 9:09 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
Are you testing on Mac OS X 10.7.0~7.2? These versions have a flaky Sandbox, where apps can crash on launch and there is no way to access files that you app previously accessed.

If you are running 10.7.0~7.2, update to 10.7.5.

You also need to make sure that you are setting the correct entitlements (although I've never seen an app crash because the entitlements were not configure correctly), you'll need entitlements for open/save dialogs, printing and camera access. If you're accessing a USB camera (not the built-in Apple camera) you may also need USB entitlements.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group