Say I am making Root <-> Child
application (i.e. Manager <-> Employee
).
Say Manager
has predefined email and already granted userDiscoverability
application permission (via 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
.
For achieving this I am using CKContainer.discoverUserIdentity
, then CKContainer.fetchShareParticipant
, then CKModifyRecordsOperation
which saves both CKRecord
and 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
.
Now on Manager
side I want silently accept CKShare
invitation in order to access Employee
record (i.e. for time tracking).
How to silently accept CKShare
invitation without need of sending URL link via email, Messages.app, without using UICloudSharingController, etc.?
Is it possible to purely programmatically, silently, using CloudKit only share CKShare
from one side and accept it on other side?
Thank you!