Command line tool for mac

broken image

I created an entitlement in Xcode, and signed the binary using that entitlement. avrdude was signed, but it couldn’t access the serial ports (shown in Console as sandboxd error). I compiled the command line tool avrdude and had Xcode copy to the resource folder of the application bundle. Things are a lot easier if you are creating the command line tool in Xcode from scratch, but most command line utilities don’t have Xcode project files. I had access to the avrdude source code, but didn’t want (or need) to add the code to Xcode for building since it built fine using make. Turns out that there are some very specific steps and concepts that need to be considered when including a command line tool in a Mac App. I had expected that the avrdude binary needed to be signed and placed in the correct location in the app bundle. I then looked at submitting the app to the Mac App Store. I recently was working on a Mac app to flash an Arduino using the open source project avrdude in my Mac app, and got it working as expected.