ifuse icon indicating copy to clipboard operation
ifuse copied to clipboard

Can i use libimobiledevice in sandbox app?

Open jimwan opened this issue 7 years ago • 1 comments

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);

jimwan avatar Jan 08 '18 09:01 jimwan

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.

Schlaubischlump avatar Nov 15 '22 23:11 Schlaubischlump