iOS SDK Profile
I did not found in documentation how can I update those values:
Work mobile -> Number, Share
Personal phone -> Number, Share
Personal mobile -> Number, Share
Also what next I did not found is how can I set these settings:
User my mobile phone for business call: Bool
VoIP business calls: Bool
Ingore VoIp: Bool
-
Hello Patrik
I have checked on the public API and you are right, this part is not documented. I will add in the documentation.
For quick help to update these fields, you need to call the method updateUserWithFields with specific fields :
let updatedFields = [
"professional_mobilephone": "0123456789",
"personal_landphone": "0123456789",
"personal_mobilephone" : "0123456789"
]
ServicesManager.sharedInstance().contactsManagerService.updateUser(withFields: updatedFields) { error in
// Completion handler
}Note that you also have following fields to update the visibility of these fields :
- "professional_mobilephone_visible"
- "personal_landphone_visible"
- "personal_mobilephone_visible"
Example to make them all visible :
let updatedFields = [
"professional_mobilephone_visible": 1,
"personal_landphone_visible": 1,
"personal_mobilephone_visible" : 1
]---
For the telephony part.
"Use my mobile phone for business call" : phone number is mandatory and used only if the VoIP is NOT enabled
NB : It's also for "VoIP business calls" (the second parameter).
To enable the first setting (and set the VoIP setting) :
ServicesManager.sharedInstance()?.telephonyService.nomadicLogin(withPhone: "0123456789", withVoIP: false, withCompletionBlock: { error in
})To disable the first setting :
ServicesManager.sharedInstance()?.telephonyService.nomadicLogout(completionBlock: { error in
})For the VoIP, just call login again with "false" value
And for the last setting :
ServicesManager.sharedInstance().myUser.updateIgnoreTelephonyCallsIfDnd(true, completionBlock: nil)
Sorry for the delay to answer, hope it helps.
Nghia
Por favor, entrar para comentar.
Comentários
3 comentários