4

I have a working native iPhone/iPad app that I’m now trying to also do as a Mac Catalyst app. Everything seems to working, except when I enter something on the iOS version, it "breaks" the macOS version – I’m using CloudKit and CloudKit subscriptions to listen to changes in database.

I get this into the log 3 times:

2020-04-25 09:58:35.612887+0300 MyApp[2871:206093] [assertion] Error acquiring assertion: <NSError: 0x600000d4cb40; domain: RBSAssertionErrorDomain; code: 2; reason: "Specified target process does not exist">
2020-04-25 09:58:35.613919+0300 MyApp[2871:206093] [assertion] Error acquiring assertion: <NSError: 0x600000d4d290; domain: RBSAssertionErrorDomain; code: 2; reason: "Specified target process does not exist">
2020-04-25 09:58:35.615102+0300 MyApp[2871:206093] [assertion] Error acquiring assertion: <NSError: 0x600000d4de00; domain: RBSAssertionErrorDomain; code: 2; reason: "Specified target process does not exist">

The behaviour is really strange. The macOS version doesn’t actually crash, but the main window disappears and I have to rebuild it in XCode the run it again. I’ve tried adding breakpoints etc to the notifications flow, but there’s nothing that catches so I’m really stumped. None of the usual application methods are called when the notification is received. The same problem appears in debug mode, both with simulator and device, and also in production.

Really hoping to get some pointers, where/how to debug this kind of a problem. I’ve checked the system logs and cannot find anything there either.

1 Answer 1

6

Just ran into this myself, and eventually figured it out: you probably have more than one instance of the app (with that bundle ID) on your machine, and the push notification service is trying to spin up the wrong binary to deliver the notifications.

Since Catalyst apps get nuked if they try to open multiple instances, this background launch kills the app you're running in the debugger.

In my case, I had the App Store version of the app installed in /Applications (before I started adding CloudKit), and my current dev binary in my Xcode build root.

Hope that helps!

3
  • I'm facing the same issue. How do I know the error is related to CloudKit?
    – Harry Ng
    May 22, 2020 at 8:49
  • FYI, I don't have the App Store version in system Applications etc. Yet, I'm noticing a weird behaviour (perhaps coincidentally) only the last few days. My Xcode run build is occasionally connecting to CloudKit production environment which messed my data. My entitlement APS environment has always been pointing to development
    – Harry Ng
    May 22, 2020 at 8:55
  • So I am having this issue with a Twitter Callback URL on MacOS, works fine on the iOS version of the app. I did uninstall my App Store version. Still getting the error. Any other suggestions... May 23, 2020 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.