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

IOS- issue (opening overlay but it is not filling the displayName and email values in contact overlay) #24

Open
maheshkumawat23 opened this issue Jan 18, 2017 · 3 comments

Comments

@maheshkumawat23
Copy link

Hi all,

I used this plugin in my cordova application it's working fine with android, but i used this plugin to add contact details in Iphone than overlay is coming with empty values.

I am passing the data like this
var contact = {};
contact.displayName = $scope.contactData.name;
contact.email = $scope.contactData.email;

than calling the contactAdd function but it's coming empty with native contact overlay in ios.
same code working fine with android, please let me know the issue.
Thanks

@hazemhagrass
Copy link
Owner

hazemhagrass commented Jan 18, 2017 via email

@maheshkumawat23
Copy link
Author

Hi Hazem,
I found this on cordova contact plugin documentation, please have a look on this.

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-contacts/

displayName: Not supported on iOS, returning null unless there is no ContactName specified, in which case it returns the composite name, nickname or "", respectively.

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants