07-13-2023 10:24 AM
Built application fails. Application is listed as universal???
Build folder deleted entirely and rebuilt today, (July 13, yet application listed as May 12!!). Main VI is listed as edited today.
49184651 240 -r-xr-xr-x 1 sth admin 119512 May 12 13:13 SCM4 Interlock Network Client*
Executable has universal type:
% file MacOS/SCM4\ Interlock\ Network\ Client
MacOS/SCM4 Interlock Network Client: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
MacOS/SCM4 Interlock Network Client (for architecture x86_64): Mach-O 64-bit executable x86_64
MacOS/SCM4 Interlock Network Client (for architecture arm64): Mach-O 64-bit executable arm64
Correct arm64 llb is installed in "Resources".
1432 -rw-r--r-- 1 sth admin 730568 Jul 13 10:56 Resources/AppContents_arm64.llb
However application fails to run.
Application runs fine on LV2023Q1 on MacOS x86?
What gives?
07-13-2023 11:31 AM
Figured it out.
The code signing requirements are unclear (and incorrect). I assumed that the binary needed to be resigned only when you messed with it by adding the second llb to make it universal.
No, for Apple Silicon every app needs to be explicitly code signed. I assume this can be done with a simple post build script. However the signing command listed previously does not seem to work. The correct ad hoc code sign command is:
codesign --force --deep -s - <path to .app bundle>