Modified mach-o app binary throws CKException

I have made sure to move the modified mac app binary instead of copying it, checked both version's inode numbers (Not the same), and restart my computer as mentioned in https://developer.apple.com/documentation/security/updating_mac_softwar, but the binary still exited with signal 9 and in the crash logs it was a code sign issue:

EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))

So I signed the binary again with my certificate but now this is the error that I get when running the binary:

codesign --force --sign "signature..." binary 
 *** Terminating app due to uncaught exception 'CKException', reason: 'containerIdentifier can not be nil'

I looked around but I couldn't find any information related to my specific case, any pointers would be appreciated.

Replies

I also noticed some additional information regarding the crash in the debugger:

Invalid value of "(null)" for entitlement "com.apple.application-identifier" or "com.apple.developer.associated-application-identifier" on process "(12081)". We expect TEAMID.BUNDLEID, and insist that TEAMID is exactly 10 characters long, consisting of [0-9][A-Z]. This is a permanent issue, and access to CloudKit will be denied until this is resolved

It’s hard to say what’s going on here without more context:

  • Are you building an app? That is, something that the user can double click in the Finder? Or are you using the term “app” in the generic sense?

  • Are you using Xcode to build this? Or building using command-line tools? Or perhaps using third-party tooling?

Note I have a whole bunch of posts related to debugging problems like this rooted at Resolving Trusted Execution Problems.

Share and Enjoy

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