How can I open a .vCard file from my app?

Anyone knows how can I add a new contact from a .vcard saved in my app?

On iOS when you open a .vcard sent by email it opens directly a popup asking if you want to save it as a new contact. How can i create something similar without passing by sending an email? 

I’ve looked in the Docs but i did not find something usefull.

thank you

You could try to get the data off the vCard use the address book to add contact. Check out this blog post to see how to do it
https://coronalabs.com/blog/2013/08/13/access-to-ios-contacts/

thank you scottrules44,

I was looking for a faster way because creating a code able to decode every possible vcard file is not so easy for a beginner like me.

the problem is that on iOS the activities popup supports natively all types of file, while corona sdk allows only images urls and strings.

i’ll try to create something with the addressbook popup 

:slight_smile:

 

You could try to get the data off the vCard use the address book to add contact. Check out this blog post to see how to do it
https://coronalabs.com/blog/2013/08/13/access-to-ios-contacts/

thank you scottrules44,

I was looking for a faster way because creating a code able to decode every possible vcard file is not so easy for a beginner like me.

the problem is that on iOS the activities popup supports natively all types of file, while corona sdk allows only images urls and strings.

i’ll try to create something with the addressbook popup 

:slight_smile: