iOS SDK | photoData always return Nil
I have posted that issue also in github
Ive tried to retrieve my avatar, but response is nil
ServicesManager.sharedInstance().myUser.contact?.photoData
I was following samples and documentation, but seems they are not up to date. Also sample is wrong.
First I think you have wrong parameter anyway in function down bellow. Parameters should be NSNotification instead of Notification.
@objc func didGetInfo(notification : Notification) {
if let contact = notification.object as? Contact {
self.updateUI(contact)
}
}
Then if statements is wrong and self.updateUI will never will be executed . Because NSNotification is NSDictionary and correct declaration should be
guard let data:NSDictionary = notification.object as? NSDictionary else {return}
guard let contact:Contact = data.object(forKey: "contact") as? Contact else { return }
But property contact.photoData is still nil. Even I called
servicesManager?.contactsManagerService.fetchRemoteContactDetail(servicesManager?.myUser.contact)
which by documentation is not necessary for personal profile.
Iniciar sesión para dejar un comentario.
Comentarios
0 comentarios