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

Create new contact: Provided properties not used on iOS #21

Open
AbraXus opened this issue Jan 14, 2016 · 2 comments
Open

Create new contact: Provided properties not used on iOS #21

AbraXus opened this issue Jan 14, 2016 · 2 comments
Assignees
Labels

Comments

@AbraXus
Copy link

AbraXus commented Jan 14, 2016

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.

@hazemhagrass
Copy link
Owner

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

@gvalenciax
Copy link

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 = "isabela@isabela.com";
contact.mobileNumber = "+1-555-555-555"
contact.nickname = "Isabela";

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

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

No branches or pull requests

5 participants