Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photo issue to base64 #45

Open
jmfsilva opened this issue Jul 30, 2018 · 0 comments
Open

Photo issue to base64 #45

jmfsilva opened this issue Jul 30, 2018 · 0 comments

Comments

@jmfsilva
Copy link

jmfsilva commented Jul 30, 2018

Platform: ios

method call: getAllContacts()

config: const desiredFields = ["name", "phoneNumbers", "photo"];

code called: contact.photo && contact.photo.toBase64String("png")

Error: getAllContacts Catch: TypeError: contact.photo.toBase64String is not a function. (In 'contact.photo.toBase64String("png")', 'contact.photo.toBase64String' is undefined)

This happens on the first object with image:

{
"id": "412412412",
"name": {
"given": "Bill",
"middle": "",
"family": "Jobs",
"prefix": "",
"suffix": "",
"displayname": "",
"phonetic": {
"given": "",
"middle": "",
"family": ""
}
},
"organization": {
"name": "",
"jobTitle": "",
"department": ""
},
"nickname": "",
"notes": "",
"photo": {
"ios": {}
},
"urls": [],
"phoneNumbers": [
{
"id": "12412412412412",
"label": "Mobile",
"value": "XXXXXXXXXX"
}
],
"emailAddresses": [],
"postalAddresses": []
}

I also tried to do ImageSourceModule.fromNativeSource(contact.photo).toBase64String("png")
and ImageSourceModule.fromNativeSource(contact.photo.ios).toBase64String("png")
this will lead to an error setNativeSource is not UIImage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant