4 Replies
      Latest reply on Jun 20, 2019 11:41 AM by ryannn
      Rubenfern Level 1 Level 1 (0 points)

        Hi,

         

        I'm testing the new sync between CoreData and CloudKit introduced in WWDC but Xcode give me the error:

         

        The connection to service on pid 0 named com.apple.coredatad.cloudkit was invalidated

         

        I've tried to start a new empty project or use the example project of WWDC session 202 and the same issue. Bundle ID is correct and I have Capabilities of iCloud and Background modes enabled.

         

        Running Xcode 11 on macOS Mojave and macOS Catalina. Testing devices: iPad Pro and iPhone running iOS 13 beta.

         

        Any idea about what's wrong?

         

        Thanks in advace.

        • Re: The connection to service was invalidated
          abargh Level 1 Level 1 (0 points)

          I'll second that.

           

          Just tried something similar myself.

           

          When running in the simulator, records are definitely saved up to iCloud as I can see them in the CloudKit dashboard (once you update the index to make the recordName queryable).  I've tried this from both the simulator and via a second (physical) device.

           

          Whilst I know that notifications don't work on the simulator it doesn't appear that notifications are being received on the physical device either and I'm getting the same error message as you reported in the console for that device.

           

          Running Xcode 11, macOS Catalina. Testing Devices: Simulator / 9.7 iPad Pro iOS 13 Beta.

           

          I'm in the middle of investigating so I'll post anything else I find.

          • Re: The connection to service was invalidated
            nitramluap Level 1 Level 1 (0 points)

            I suspect it's just because it's still very much in the beta phase.

             

            I have an app with about 3600 core data managed objects and they appear to be uploading OK (although it's hard to really know without any sort of % progress feedback). I did get a lot of "Limit Exceeded" errors (syncing more than 400 CKRecords at a time isn't allowed) but it seemed to automatically divide the requests and reschedule them.

             

            However, on my second device, only a fraction of the data has come down and there is no way to tell what percentage has completed so it's anyone's guess as to whether it is 'done' or not...

             

            So far, I'm very impressed that it works at all given that it required effectively no code (especially all that complicated error handling), but I think they still have a way to go before I'm confident enough to roll it out to my users.

            • Re: The connection to service was invalidated
              ryannn Level 1 Level 1 (0 points)

              I'm also receiving the same error, keen to know if anyone has this working!