Recent

Author Topic: MacOS suddenly complaining release builds are 32bit  (Read 3145 times)

MISV

  • Hero Member
  • *****
  • Posts: 804
MacOS suddenly complaining release builds are 32bit
« on: May 13, 2024, 02:31:16 pm »
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-cocoa
I 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.

Code: Pascal  [Select][+][-]
  1.   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"
  2.  
  3.   codesign --verbose --force --options runtime --timestamp --sign "COMPANY NAME" "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
  4.  
  5.   codesign --verbose --display --entitlements :- "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
  6.  
  7.   rm -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip"
  8.  
  9.   cd "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/"
  10.  
  11.   zip -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip" "mac-mytool-files/" -x "*.DS_Store"
  12.  
  13.   /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"
  14.  
  15.   /usr/bin/xcrun stapler staple -v "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
  16.  
  17.   codesign --verify --deep --strict --verbose "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
  18.  
  19.   rm -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip"
  20.  
  21.   cd "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/"
  22.  
  23.   zip -r "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files.zip" "mac-mytool-files/" -x "*.DS_Store"
  24.  


My info.plist file is:

Code: Pascal  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <plist version="1.0">
  4. <dict>
  5.     <key>CFBundleDevelopmentRegion</key>
  6.     <string>English</string>
  7.     <key>CFBundleExecutable</key>
  8.     <string>MyTool</string>
  9.     <key>CFBundleName</key>
  10.     <string>MT</string>
  11.     <key>LSApplicationCategoryType</key>
  12.     <string></string>
  13.     <key>CFBundleIdentifier</key>
  14.     <string>com.example.MyTool</string>
  15.     <key>CFBundleInfoDictionaryVersion</key>
  16.     <string>6.0</string>
  17.     <key>CFBundlePackageType</key>
  18.     <string>APPL</string>
  19.     <key>CFBundleSignature</key>
  20.     <string>mt</string>
  21.     <key>CFBundleShortVersionString</key>
  22.     <string>1.3.0</string>
  23.     <key>CFBundleVersion</key>
  24.     <string>1.3.0</string>
  25.     <key>CFBundleIconFile</key>
  26.     <string>MyTool.icns</string>
  27.     <key>CSResourcesFileMapped</key>
  28.     <true/>
  29.     <key>NSRequiresAquaSystemAppearance</key>
  30.     <false/>                
  31.     <key>NSAppTransportSecurity</key>
  32.     <dict>
  33.       <key>NSAllowsArbitraryLoads</key>
  34.       <true/>      
  35.     </dict>
  36.     <key>CFBundleDocumentTypes</key>
  37.     <array>
  38.         <dict>
  39.             <key>CFBundleTypeRole</key>
  40.             <string>Viewer</string>
  41.             <key>CFBundleTypeExtensions</key>
  42.             <array>
  43.                 <string>*</string>
  44.             </array>
  45.             <key>CFBundleTypeOSTypes</key>
  46.             <array>
  47.                 <string>fold</string>
  48.                 <string>disk</string>
  49.                 <string>****</string>
  50.             </array>
  51.         </dict>
  52.     </array>
  53.     <key>NSHighResolutionCapable</key>
  54.     <true/>
  55.     <key>LSMinimumSystemVersion</key>
  56.     <string>10.8</string>      
  57. </dict>
  58. </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

Code: Pascal  [Select][+][-]
  1.   codesign --verify --deep --strict --verbose "/Volumes/DiskW/projects/MyTool/osx/final_mytool-dist/mac-mytool-files/mytool.app"
  2.  

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/682775
https://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format
« Last Edit: May 22, 2024, 12:43:45 pm by MISV »

madref

  • Hero Member
  • *****
  • Posts: 1078
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: MacOS suddenly complaining release builds are 32bit
« Reply #1 on: May 20, 2024, 05:52:45 pm »
which version did you install?


to install lazarus I use: FPCUPdeluxe.
you can find it here https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

« Last Edit: May 20, 2024, 05:54:29 pm by madref »
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7
Lazarus 3.99 (Lazarus 3.99 (rev main_3_99-2668-g6b352d830e) FPC 3.3.1 x86_64-darwin-cocoa)

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

Josh

  • Hero Member
  • *****
  • Posts: 1344
Re: MacOS suddenly complaining release builds are 32bit
« Reply #2 on: May 21, 2024, 03:41:10 pm »
Hi

Are you sure you have the target CPU set correctly.

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

MISV

  • Hero Member
  • *****
  • Posts: 804
Re: MacOS suddenly complaining release builds are 32bit
« Reply #3 on: May 22, 2024, 11:24:20 am »
Thank you everyone. I have just heavily expanded the post, so you can better see what I have tried and my process

I am using FPCUPdeluxe.

Version 3.2. Date 2024-05-11. FPC version: 3.2.2: Revision: Lazarus_3_2. X86_64-darwin-cocoa

And yes, I already explicit set. Target OS: Darwin. Target CPU family: x86_64. Target processor: ATHLON64


MISV

  • Hero Member
  • *****
  • Posts: 804
Re: MacOS suddenly complaining release builds are 32bit
« Reply #4 on: May 22, 2024, 11:29:52 pm »
Thank to Keka compressor author I was steered towards the right way path.

- I believe there was an issue with some files somehow causing problem.
- Also I messed up some of my tests (my command line copying the executable to release .app was errorneous)
- I now sign with deep

Problems may return and then I will return here.



 

TinyPortal © 2005-2018