capacitor-community / contacts

Contacts Plugin for Capacitor
https://capacitor-community.github.io/contacts/
125 stars 54 forks source link

iOS 18 update - support for "select contacts" flow #125

Open emily-ginsburg opened 2 months ago

emily-ginsburg commented 2 months ago

Is your feature request related to a problem? Please describe. iOS 18 added the option to select which contacts you share with an app (instead of just "allow all" or "deny all"). When a user selects the option to select individual contacts for sharing, this plugin doesn't indicate that the permission is different (result of requestPermissions is {contacts: 'granted'}), and there's no way to prompt the user to select more contacts to share (requestPermissions and getContacts behavior not changed, as if all my contacts are already shared).

Describe the solution you'd like I would expect an additional response option in PermissionState that indicates only some contacts were shared (e.g. Geolocation.requestPermissions from @capacitor/geolocation returns PermissionStatus that includes two states, precise location and coarse location). And then I would expect there to be a function that allows the app to prompt the user to share more contacts (e.g. Camera.pickImages from @capacitor/camera when individual photos are shared).

Describe alternatives you've considered Using an alternate plugin I guess :')

Additional context IMG_0901

Thank you in advance!

daniloargentiero commented 2 months ago

I encountered the same issue. Please prioritize this bug as it makes the plugin incompatible with iOS 18.

daniloargentiero commented 2 months ago

I've created a pull request: https://github.com/capacitor-community/contacts/pull/137