Codesigning/Testflight differences for macOS distributed apps for macOS 12 and 13/14

We have run into a very unique situation with codesigning and testing the apps under TestFlight under macOS 12 and macOS 13/14.

We have existing apps on the macApp store and we are trying to basically update them. When we run the newly updated versions via Testflight under macOS 12, everything is working. However, the same apps under macOS 13/14 and Testflight crashes and we have narrowed it to a codesigned dylib issue of ours. We are getting a invalid code signature message when we try to load a dylib under macOS 13/14 and the app crashes as we cant get the dylib code pointer. Basically CFBundleGetFunctionPointerForName returns an invalid value.

Just to explain we build our dylibs/bundles and codesign them outside - as these are built at the command line level and finally we package these within our apps under XCODE and go through the whole app building/archiving, code signing, validation and uploading that to the appstore.

The crash log shows -


Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2023-11-28 23:31:11.9903 +0900 OS Version: macOS 13.6 (22G120) Report Version: 12 Anonymous UUID:

Time Awake Since Boot: 370000 seconds

System Integrity Protection: enabled

Crashed Thread: 7

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [91418]

VM Region Info: 0 is not in any region. Bytes before following region: 4368842752 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START --->
__TEXT 104674000-1047f0000 [ 1520K] r-x/r-x SM=COW ...essional 2017

Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x195a83de4 _kernelrpc_mach_port_deallocate_trap + 8 1 libsystem_kernel.dylib 0x195a85270 mach_port_deallocate + 28 2 QuartzCore 0x19d0cc458 CA::Context::destroy() + 512 3 QuartzCore 0x19d22135c invocation function for block in CA::Context::commit_transaction(CA::Transaction*, double, double*) + 100


We have double checked/triple checked the certificates and profiles and everything is valid. What is strange is that it works under macOS 12 and Testflight but not under macOS 13/14. For both Intel/Arm.

Any ideas anyone?

I’ve seen stuff like this before and it took me a long time to track it down. Hopefully I can do better this time (-:

To start, please post a full crash report, using the instructions in Posting a Crash Report.

You wrote:

we package these within our apps under Xcode and go through the whole app building/archiving, code signing, validation and uploading that to the appstore.

So, to be clear, you’re building an Xcode archive and then uploading it to App Store Connect in the Xcode organiser by clicking Distribute App?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Codesigning/Testflight differences for macOS distributed apps for macOS 12 and 13/14
 
 
Q