xcodebuild export archive unsigned macOS App

Before updating to xcode 8.3, I was able to export an unsigned macOS App like this:

xcodebuild \
-exportArchive \
-exportFormat app \
-archivePath "${ARCHIVE_DIR}/${APP_NAME}.${version}.xcarchive" \
-exportPath "${RELEASE_APP_DIR}/${version}/${APP_NAME}.app"


Now the -exportFormat option is not allow and -exportOptionsPlist is required. I tried switching to using -exportOptionsPlist, but I am getting the following error:

"No 'teamID' specified and no team ID found in the archive"


Since I am releasing the App in an enterprise environment, I need to use a special codesigning mechanism, because I am not allowed to directly access the private key for the codesigning certificate. I need to be able to export the archive unsigned, so that I can sign it outside of xcode. How do I do this?


thanks,

-Nathan

Actually maybe I can just copy the app from the archive instead of exporting it? I tried doing this, and then did a recursive diff and it looks like there is some difference with the binary files (the executable and frameworks). What exactly is the difference between exporting and copying?

xcodebuild export archive unsigned macOS App
 
 
Q