Realm Cloud Swift - Allowing User to Write to Other Users Realm? PLEASE HELP. Final Year College Project

(Alan Doonan) #1

I am trying to write to another users realm after granting permission in Swift for iOS. Can somebody please help me on this? I keep getting the below error in the logs:

HTTP response: ab8a03c6-c5d6-4b30-bcc3-bfca78d48d09 {“type”:“",“title”:"The path is invalid or current user has no access.”,“status”:403,“code”:614}

Can you please advise the correct way to format the below permissions statement?

let permission = SyncPermission(realmPath: realmPath, // The remote Realm path on which to apply the changes
identity: anotherUserID, // The user ID for which these permission changes should be applied
accessLevel: .write) // The access level to be granted
user.apply(permission) { error in
if let error = error {
// handle error
// permission was successfully applied