Skip to content

feat(contacts): add support for iOS 18 limited contact access#137

Closed
daniloargentiero wants to merge 2 commits into
capacitor-community:mainfrom
daniloargentiero:patch-1
Closed

feat(contacts): add support for iOS 18 limited contact access#137
daniloargentiero wants to merge 2 commits into
capacitor-community:mainfrom
daniloargentiero:patch-1

Conversation

@daniloargentiero

Copy link
Copy Markdown
  • Updated permissions handling to recognize and support the new .limited authorization status introduced in iOS 18.
  • Integrated CNContactPickerViewController to handle contact selection, including the ability to select multiple contacts.
  • Added support for fetching and returning contacts when the user grants limited access, ensuring proper data flow with the new privacy model.
  • Refactored permission request flow to handle new iOS 18 privacy features for contact access.

- Updated permissions handling to recognize and support the new `.limited` authorization status introduced in iOS 18.
- Integrated `CNContactPickerViewController` to handle contact selection, including the ability to select multiple contacts.
- Added support for fetching and returning contacts when the user grants limited access, ensuring proper data flow with the new privacy model.
- Refactored permission request flow to handle new iOS 18 privacy features for contact access.
Comment thread ios/Plugin/ContactsPlugin.swift Outdated
Comment on lines +205 to +224
public func contactPicker(_ picker: CNContactPickerViewController, didSelect contacts: [CNContact]) {
let call = self.bridge?.savedCall(withID: self.pickContactCallbackId ?? "")

guard let call = call else {
return
}

var contactsArray: [JSObject] = []
for selectedContact in contacts {
let contact = ContactPayload(selectedContact.identifier)
contact.fillData(selectedContact)
contactsArray.append(contact.getJSObject())
}

call.resolve([
"contacts": contactsArray
])

self.bridge?.releaseCall(call)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this related to the new limited permission? Adding the new permission state should be enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks, I will try if it works without this one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniloargentiero Are you still working on this?

Co-authored-by: Robin Genz <mail@robingenz.dev>
@NatanTechofNY

NatanTechofNY commented Apr 8, 2025

Copy link
Copy Markdown

@daniloargentiero can you re-request a review from @robingenz ?

@tylerclark

Copy link
Copy Markdown

Hi @robingenz - Do you know the status of this PR? We are hitting this road block.

@robingenz

Copy link
Copy Markdown
Member

As you can see, not all of my review comments are resolved.

@tafelnl

tafelnl commented Dec 22, 2025

Copy link
Copy Markdown
Member

Closed in favor of #149

@tafelnl tafelnl closed this Dec 22, 2025
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

Successfully merging this pull request may close these issues.

5 participants