I recently returned to some software I am releasing on Mac after having been away a couple of years.
I am on MacOS Big Sur 11.7.10. (I Could not upgrade to any newer, but had to upgrade to Bir Sur due to Catalina not having the new notary tool part of xcode as required by Apple. My old process worked flawlessly for years.)
My code signing process is like this – and at each step everything appears to be passed and correct. Here is my code signing process.
cp -p "/Volumes/DiskW/projects/MyTool/compiled/MyToolOSX.App/Contents/MacOS/MyToolOSX" "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app/Contents/MacOS/mytool"
codesign --verbose --force --options runtime --timestamp --sign "COMPANY NAME" "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
codesign --verbose --display --entitlements :- "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
rm -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip"
cd "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/"
zip -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip" "mac-mytool-files/" -x "*.DS_Store"
/usr/bin/xcrun notarytool submit "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip" --wait --verbose --apple-id "MYAPPLEID" --team-id MYTEAMID --password "MYAPPPASSWORD"
/usr/bin/xcrun stapler staple -v "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
codesign --verify --deep --strict --verbose "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
rm -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip"
cd "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/"
zip -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip" "mac-mytool-files/" -x "*.DS_Store"
My info.plist file is:
Well, what happens is this… When I download and/or unzip this thing and try run it… I get the error in subject. I have tried many things. It is driving me nuts. I am trying here and will be happy to respond/expand if anyone has questions or solutions to try.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>MyTool</string>
<key>CFBundleName</key>
<string>MT</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.example.MyTool</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>mt</string>
<key>CFBundleShortVersionString</key>
<string>1.3.0</string>
<key>CFBundleVersion</key>
<string>1.3.0</string>
<key>CFBundleIconFile</key>
<string>MyTool.icns</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>fold</string>
<string>disk</string>
<string>****</string>
</array>
</dict>
</array>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
</dict>
</plist>