ContactPicker icon indicating copy to clipboard operation
ContactPicker copied to clipboard

Create new contact: Provided properties not used on iOS

Open AbraXus opened this issue 9 years ago • 2 comments

First of all: Thanks a lot for this plugin. It's the only one I know of that shows the native dialog when adding new contacts. My problem: The iOS version seems to ignore the contact options I'm providing. The code below works perfect on Android (4.4.4). When I run it on iOS (9.2), all input fields of the form are empty.

contact = {};
contact.displayName = "Peter";
contact.mobileNumber = "+1-202-555-129";
window.plugins.ContactPicker.addContact(contact, function(contactInfo) {
  alert(contactInfo.displayName + ' ' + contactInfo.phones[0] + ' ' + contactInfo.email);
});

Any help would be much appreciated.

AbraXus avatar Jan 14 '16 14:01 AbraXus

mmm, it seems that we have a bug here and we will work on it ASAP

hazemhagrass avatar Feb 15 '16 11:02 hazemhagrass

Hi,

Check gvalenciax/ContactPicker fork. This solve pre-filled properties in iOS. Also solve runtime permissions problem in Android Mashmallow. I worked from the gimalon fork.

Regards

var contact = {};
contact.displayName = "Isabela";
contact.email = "[email protected]";
contact.mobileNumber = "+1-555-555-555"
contact.nickname = "Isabela";

window.plugins.ContactPicker.addContact(contact, function (contactInfo) {
        alert(contactInfo.displayName + ' ' + contactInfo.phones[0] + ' ' + contactInfo.email);
});

gvalenciax avatar Aug 27 '17 07:08 gvalenciax