Open() is not working after sandbox turning on.

My app is working fine till I turn on app sandbox capability. After turning on some APIs like open(), read() etc. are not working which is for drive access. Are there any entitlement key for getting access after turning on sandbox capability?

open
will work in general, it’s just that the sandbox is preventing you from opening files outside of your app’s container. There are various ways around this, so many in fact that it’s not feasible to explain them here. Fortunately, the are discussed in depth in the App Sandbox Design Guide.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I read this document but still haven't got the required result. What I want is to read the drive sector by sector,which is of course outside app’s container, but sendboxing is not allowing to do so. For doing same I try to add two entitlement keys(Which I thought relevant to get the access) 1) com.apple.security.device.serial 2) com.apple.security.device.usb but nothing happened. And write() will be needed at time of saving. Some application are there on app store which are doing what I need, few apps are - https://itunes.apple.com/in/app/disk-doctors-photo-recovery/id497911178?mt=12

https://itunes.apple.com/in/app/easeus-data-recovery-wizard/id740355970?mt=12


I am trying since last month please help me for this as soon as possible. Thank you.

What I want is to read the drive sector by sector,which is of course outside app’s container, but sendboxing is not allowing to do so.

I presume you’re sandboxing because you want to ship on the Mac App Store. If so, you won’t be able to do the above. Mac App Store apps are not allowed to elevate privileges and doing block level I/O on a disk requires elevated privileges.

With regards the apps you mentioned, in general I’m not able to comment on other developer’s apps, for reasons which I’m sure you’ll understand. A while back I posted my general answer to questions like this.

However, in the case of EaseUS Data Recovery Wizard, their Mac App Store description is very straightforward:

The app store version can only recover lost data from DMG.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Open() is not working after sandbox turning on.
 
 
Q