libimobiledevice / ifuse

A fuse filesystem to access the contents of iOS devices
https://libimobiledevice.org
GNU Lesser General Public License v2.1
812 stars 135 forks source link

Can i use libimobiledevice in sandbox app? #42

Open jimwan opened 6 years ago

jimwan commented 6 years ago

I tried to connect the IOS device in a sandboxed App using this code. There is no error returned, but the coreEventCallback is not called then. idevice_error_t errCode = idevice_event_subscribe(coreEventCallback, NULL);

Schlaubischlump commented 1 year ago

I know this issue is already 5 years old, but it might still be helpful for somebody.

If your macOS app is sandboxed but you still want to use libimobiledevice, you need to allow access to usbmuxd by adding an exception to the apps entitlements to access the usbmuxd instance at /private/var/run/usbmuxd. Apple will most likely reject your app for using this workaround.

<key>com.apple.security.temporary-exception.sbpl</key>
<array>
    <string>(allow network-outbound (literal &quot;/private/var/run/usbmuxd&quot;))</string>
</array>

I successfully use this approach for LocationSimulator.