1

My app uses NSPersistentCloudKitContainer and it works just fine on iPhone and iPad. Once I ported it to Mac (Catalyst), I started experiencing a EXC BAD INSTRUCTION crash and I can't to wrap my head around it.

I decided to port to MacOS Apple's NSPersistentCloudKitContainer demo project from WWDC 2019 using Catalyst and I'm experiencing the same crash.

I also tried starting a new simple project that I ported to MacOS using Catalyst and it doesn't crash. So, my guess is that the problem is related to the new NSPersistentCloudKitContainer..

Anybody experiencing the same crash? Any guidance would be appreciated.

Here is the crash log:

libxpc.dylib`___xpc_activity_dispatch_block_invoke.107.cold.3:
    0x7fff63df530b <+0>:  pushq  %rbp
    0x7fff63df530c <+1>:  movq   %rsp, %rbp
    0x7fff63df530f <+4>:  xorl   %edi, %edi
    0x7fff63df5311 <+6>:  callq  0x7fff63df53c0            ; symbol stub for: _os_assert_log
    0x7fff63df5316 <+11>: movq   %rax, %rdi
    0x7fff63df5319 <+14>: callq  0x7fff63df53d2            ; symbol stub for: _os_crash
->  0x7fff63df531e <+19>: ud2    
rs7
  • 1,618
  • 1
  • 8
  • 16
  • When I run my app without Xcode I'm not seeing the crash. So it's somehow related to running my app in Xcode. – rs7 Feb 06 '20 at 04:03
  • I have this same issue right now. How did you fix it? I think it's something with `NSPersistentCloudKitContainer` because when I just use a `NSPersistentContainer` it works but I do not know how to fix this. – fphelp Apr 19 '20 at 07:17
  • I got some feedback from Apple about the issue which I don't believe to be accurate: "It means your provisioning profile and code signing settings (in the Signing & Capabilities) tab in Xcode are not correct. If you’re using ad-hoc code signing stop, and sign for running locally or sign for development." Let me know if this makes any sense to you. I have the automatically manage sign-in box checked so not sure what to configure. – rs7 Apr 20 '20 at 18:52

1 Answers1

0

I finally was given a fix by Apple support. The issue lied in having revoked certificates in my keychain. So, go to your keychain, and look up all your apple certificates. Upon selecting them you'll notice that they either valid (green checkmark) or revoked (red circled cross). Get rid of all of your revoked certificates, but make sure that they exist in their valid form before doing that. In my case, all the revoked certificates were duplicates of valid certificates.

rs7
  • 1,618
  • 1
  • 8
  • 16