Post

Replies

Boosts

Views

Activity

Enabling App Sandbox on a Command line tool
Hi, I'm trying to build a CLI Tool using Swift to access a usb device I'm developing. I would like to enable the App Sandbox - USB Entitlement for the tool. But as soon as I enable it and run the app in Xcode the app stops at a breakpoint on the main thread even though I didn't set any breakpoint: libsystem_secinit.dylib`_libsecinit_appsandbox.cold.5:   0x192b730d4 <+0>: pacibsp    0x192b730d8 <+4>: sub  sp, sp, #0x30       ; =0x30    0x192b730dc <+8>: stp  x20, x19, [sp, #0x10]   0x192b730e0 <+12>: stp  x29, x30, [sp, #0x20]   0x192b730e4 <+16>: add  x29, sp, #0x20      ; =0x20    0x192b730e8 <+20>: mov  x19, x2   0x192b730ec <+24>: mov  x20, x0   0x192b730f0 <+28>: str  x1, [sp]   0x192b730f4 <+32>: adrp  x2, 0   0x192b730f8 <+36>: add  x2, x2, #0xf22      ; =0xf22    0x192b730fc <+40>: mov  w1, #0x800   0x192b73100 <+44>: bl   0x192b73580        ; symbol stub for: snprintf   0x192b73104 <+48>: adrp  x8, 346125   0x192b73108 <+52>: add  x8, x8, #0x690      ; =0x690    0x192b7310c <+56>: stp  x20, x19, [x8]> 0x192b73110 <+60>: brk  #0x1 I'm running Xcode 12. This is reproducible simple by creating a new command line project and enabling the sandbox.
4
1
3.0k
Dec ’20