Reputation: 420
I am using cordova-plugin-phonenumbers to access the contacts.
https://www.npmjs.com/package/cordova-plugin-contacts-phonenumbers
It works fine on older versions. It crashes on newer iOS versions as soon as when i am trying to access the contacts. This is how i am includng the plugin in config.xml.
<plugin name="cordova-plugin-contacts-phonenumbers">
<param name="CONTACTS_USAGE_DESCRIPTION" value="This app wants to access your Contacts"/>
</plugin>
Is there anything else needs to be added? Thanks!
Upvotes: 0
Views: 168
Reputation: 1480
The following worked for me on the config.xml
<platform name="ios">
<config-file parent="NSContactsUsageDescription" platform="ios" target="*-Info.plist">
<string>Accessing contacts allows you to...</string>
</config-file>
Upvotes: 0
Reputation: 53301
That plugin doesn't have a variable for setting the usage description, so what you are trying to do won't work.
Try setting the usage description using the edit-config
tag in the config.xml instead
<edit-config target="NSContactsUsageDescription" file="*-Info.plist" mode="merge">
<string>need contacts access to search friends</string>
</edit-config>
Upvotes: 1