I recently returned to some software I am releasing on Mac after having been away a couple of years.
I am getting error "Getting "this app needs to be updated" when running my app.
I am on MacOS Big Sur 11.7.10. (I Could not upgrade to any newer, but had to upgrade to Big Sur due to Catalina not having the new notary tool part of xcode as required by Apple... My old process worked flawlessly for years.)
I am on Lazarus:
Version 3.2. Date 2024-05-11. FPC version: 3.2.2: Revision: Lazarus_3_2. X86_64-darwin-cocoaI use FPCUPdeluxe. for installing stable build.
I already explicit set:
Target OS: Darwin. Target CPU family: x86_64. Target processor: ATHLON64
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:
<?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>
Extra information. Only confuses me even more, but maybe an expert here can deduce what is going on:I have had a guy download and unzip my package. He said it appeared after unzipping the certificate no longer passes
codesign --verify --deep --strict --verbose "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
Some files giving error. He wondered if it was a
compresser error rendering the certificate invalid after compression/decompression. However, I have of course tried simply removing all those files. And now the result it: "this app needs to be updated". (Also I have been using the zip tool for 10 years, so it would be quite odd.)
But at the time, the guy tried sign the .app file himself... And then presto the app worked again.
Speculation:I can see iOS developer have had problems with
xcode signature format where it has mattered which MacOS/Xcode version is in use.
This however is a MacOS app. But maybe something worth checking.
https://developer.apple.com/forums/thread/682775https://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format