Unfortunately, you guessed correctly. On a jailbroken device, apps installed to the normal location (/var/mobile/Applications/
) are still sandboxed (* see comments below).
The jailbreak does not completely remove the sandbox.
It allows you to run code that's not signed by valid Apple certificates. It therefore also allows you to install your app to different locations.
If you install your app to /Applications/
, however, it will be able to read /var/mobile/Library/SMS/sms.db
, as I describe in this answer. As a system app, you'll be outside the sandbox.
This has nothing to do with Objective-C, or Cocoa Touch, versus C APIs. It wouldn't be much of a sandbox if all you had to do was use well-known C I/O calls to escape it.
See this other similar answer (to a closed question), for some related discussion.
Update: see saurik's comments in this online thread. The summary is that different jailbreaks (e.g. evasi0n, Absinthe, redsn0w) can affect the sandbox in different ways. Saurik's recommendation is certainly that they not be removed entirely.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…