Invite to CKShare and Accept CKShare without UICloudSharingController and without sending link with URL
Invite to CKShare and Accept CKShare without UICloudSharingController and without sending link with URL
Say I am making Root <-> Child application (i.e. Manager <-> Employee).
Root <-> Child
Manager <-> Employee
Say Manager has predefined email and already granted userDiscoverability application permission (via CKContainer.requestApplicationPermission).
Manager
userDiscoverability
CKContainer.requestApplicationPermission
When Employee starts application, initialisation sequence automatically creates CKRecord (i.e. Employee record for time tracking), CKShare and silently invites Manager to CKShare.
Employee
CKRecord
CKShare
Manager
CKShare
For achieving this I am using CKContainer.discoverUserIdentity, then CKContainer.fetchShareParticipant, then CKModifyRecordsOperation which saves both CKRecord and CKShare.
CKContainer.discoverUserIdentity
CKContainer.fetchShareParticipant
CKModifyRecordsOperation
CKRecord
CKShare
After initialisation flow in private database of Employee I have record type of cloudkit.share which has 2 participants, Employee itself and Manager. Acceptance status of Manager is INVITED. Also I have URL link which I got after saving CKShare.
Employee
cloudkit.share
Employee
Manager
Manager
CKShare
Now on Manager side I want silently accept CKShare invitation in order to access Employee record (i.e. for time tracking).
Manager
CKShare
Employee
How to silently accept CKShare invitation without need of sending URL link via email, Messages.app, without using UICloudSharingController, etc.?
CKShare
Is it possible to purely programmatically, silently, using CloudKit only share CKShare from one side and accept it on other side?
CKShare
Thank you!
The key to the puzzle is that the other party needs to do the accepting, you can not do it for them, so you need to transmit the link come what may.
– user3069232
Jul 3 at 6:37
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Vlad, I too would like to do this, got a little further by opening the URL with code, but ran out of time to get anywhere with this. Did you hear any more? If I could I would pitch in on a reward to get an answer?
– user3069232
Jul 3 at 5:52