2 Replies
      Latest reply on Feb 5, 2019 10:45 PM by bunschoten
      bunschoten Level 1 Level 1 (0 points)

        I have created an iOS app and then added a macOS target in the same project.

        Now I want both apps to share and sync data using a private database in CloudKit.

         

        In Xcode's Capabilities page (for both targets) I specified to use a custom container ID.

        => iOS and macOS apps are pointing to the same iCloud container ID.

        Then I verified in the developer portal that this iCloud container ID (and only this one ID) is set for both app IDs.

         

        When I'm running the iOS app using my developer iCloud account, everything works fine, i can see the synced data in my CloudKit dashboard.

         

        The problem is the macOS version. Somehow it's connected to a different container ID (the default one created by Xcode before I changed it to use the custom ID of the iOS app).

         

        Can anyone tell me how to make both apps share the same iCloud container? I'm only interested in a private database, sharing with other users is not required.

         

        Thanks