Adding contact to Roster using email
BeantwortetHi,
In Android:
Android they have option for adding roster to contact. it's working fine using following code.
RainbowSdk.instance().contacts().addRainbowContactToRoster(contactID, callbacks);
In iOS:
Using following code for adding roster to my contact:
ServicesManager.sharedInstance()?.contactsManagerService.invite(byEmail: mail, withCompletionHandler: { (invite) in
})
unable to add contact to roster getting following response:
- automatically accepting invite for some account.
- manually sending invite.
- i am getting nil and not sending any invite.
-
Hi Prakash,
Using IOS, you need to call the following method to do the same as for Android:
func invite(contact: Contact) {ServicesManager.sharedInstance()?.contactsManagerService.inviteContact(contact)}A request will be sent to the Rainbow user.In addition to listen to the event `kContactsManagerServiceDidUpdateContact` to be informed when the `sentInvitation` property has changed, you can listen to events `kContactsManagerServiceDidInviteContact` and `kContactsManagerServiceDidFailedToInviteContact`. This can be important because sending an invitation can failed if you send it several times quickly. Only one invitation can be sent to a Rainbow user by hour if the invitation has not been declined by your recipient or canceled by you.Regards,Olivier
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare