iCloud share link opens wrong app on App Store

102 views Asked by At

We recently integrated UICloudSharingController to share cloudkit records on one of our apps, but we noticed while testing that the icloud share link opens the wrong app on App Store if we invite a participant who has not the app installed on his device. We thought it was because we basically duplicated the same coredata/cloudkit implementation for another our app (app store opens the download page for this app), forgetting maybe some cloudkit references of the first app and indeed we noticed a wrong icloud container assignment for the second app, which essentially had two containers, the correct one (its own) and the one of the first app (the wrong one). So, we fixed the problem, every app has his own container now and only his own, and we updated the provisional profiles as well, in order to have the correct icloud containers entitlements. Unfortunately the problem persists and after check everything else (containers, app groups, PersistentStoreDescriptions etc.) we don't have any more ideas. What else should we check? Thanks in advance for your suggestions.

Some more details of the issue:

  • If we have the app installed on the device the icloud share link opens the right app.
  • The same icloud share link works properly on Mac Catalyst (the App Store opens the correct app page if we don't have the app installed). The problem is only on iOS.
1

There are 1 answers

0
user1046037 On

Could you check the following:

1. Bundle ID and CloudKit Container ID

  • Check if the Bundle ID and CloudKit Container IDs fully qualified and match on the original app
  • The 2nd app should have a different Bundle ID and Container ID from the original app.
  • How is the CKContainer created, is it using any identifier? If so does identifier correct?
  • I feel that some how the problem arises because the projects were duplicated and then modified, that is not a good idea as bundle settings, info.plist, entitlements would be reused.

2. CKSharingSupported

3. Create a new project

  • Try with a simple app and ensure Share works as you would expect
  • Copy code (not the info.plist or the entitlements) and build on it incrementally instead of doing it all in one shot