My goal is to build a macOS commandline binary with a Provisioning Profile (said profile is required, due to the use of Apple's new Endpoint Security Framework).
✅ I've created and installed the Provisioning Profile - and have no problem building and running macOS application version (Xcode auto populates the "Provisioning Profile", under "Signing and Capabilities", when the "Bundle Identifier" matches the one in the installed Provisioning Profile):
However, when attempting to build a commandline version, this option does not appear as Xcode believes "None [is] Required":
I've attempted to specify the Provisioning Profile anyways, via the project's "Build Settings" for the target:
❌ But building fails with:
processMonitor does not support provisioning profiles. processMonitor does not support provisioning profiles, but provisioning profile Process Monitor has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor.
Note, the project's Provisioning Profile (under "Build Settings") is set to "Automatic"

❌ I've also had no luck via xcodebuild, which generates the same error:
$ xcodebuild -project "processMonitor.xcodeproj" -scheme processMonitor -configuration Release PROVISIONING_PROFILE_SPECIFIER="Process Monitor" DEVELOPEMENT_TEAM="<team id>"
Build settings from command line:
DEVELOPEMENT_TEAM = <team id>
PROVISIONING_PROFILE_SPECIFIER = Process Monitor
note: Using new build system
note: Planning build
note: Constructing build description
error: processMonitor does not support provisioning profiles. processMonitor does not support provisioning profiles, ...
So, the question is: is it possible to build a stand-alone macOS commandline binary that requires a Provisioning Profile? ...and if so, how?


