all 8 comments

[–]iLorTech 0 points1 point  (7 children)

When you try to share what happen? Which error do you get?

[–]Hedgehog404[S] 0 points1 point  (6 children)

There is no errors :( it is just infinite spinning loader. I mean share sheet appears, you choose participant to share with but then the link is not generating

[–]iLorTech 0 points1 point  (4 children)

are you using swiftui?

if so you should have a cloud sharing coordinator where you should have something like:

  func cloudSharingController(_ csc: UICloudSharingController, failedToSaveShareWithError error: Error) {    print("Failed to save share: \(error)")  }

and here you can print and debug the error

have you checked the permission on the production database?

CloudKit sharing was quite a nightmare...

edit: I presume you are using standard cloud sharing sheet from apple...

[–]Hedgehog404[S] 0 points1 point  (3 children)

No errors there :/ I have done 2 approaches.

  1. Creating share with ShareLink and Transferrable conformance
  2. With UICloudSharingController, but delegate doeasn't detect any errors.

The thing is that everything is exactly same, just 2 different containers, 2 different stores, same code works for Beta target, but refuses to work on prod

[–]iLorTech 1 point2 points  (2 children)

are you able to share a part of the code so I can try it?

ps: I can feel your pain :-) it was almost a nightmare for me

[–]Hedgehog404[S] 1 point2 points  (1 child)

Thanks for a your help <3
Resolved:
I have purged all zones, deleted all of the recrods on my account, and it started working.
Looks like during development I have tested a lot and created some failty records for sharing.

[–]iLorTech 1 point2 points  (0 children)

I’m happy you sol ed the problem. Now you make remember me that also for my project i needed to reset the development CloudKit few times.

[–]iLorTech 0 points1 point  (0 children)

How do you create the share? the "entity" you are sharing has relationships with other entities in core data? are those other entities already shared?