Can you share data on CloudKit between different apps

后端 未结 1 1901
时光说笑
时光说笑 2021-01-04 22:15

I have a free and paid version of my app in the app store. I\'m updating the app to share some public data using CloudKit. I\'d like both the free and paid apps to share the

相关标签:
1条回答
  • 2021-01-04 23:01

    Yes, multiple apps can use the same CloudKit data. When you get your CKContainer, I assume you are using something like the following for both apps?

    let container = CKContainer.defaultContainer()
    

    This would work for the main app (the one with the bundle identifier that matches the cloudkit identifier). The other app(s) will need to initialize the container like so:

    let container = CKContainer(identifier: "iCloud.com.example.appname")
    
    0 讨论(0)
提交回复
热议问题