Skip to content

[@nativescript/contacs][iOS] 'note' should not be included in keysToFetch during delete() #324

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

Closed
fpaaske opened this issue Sep 8, 2022 · 1 comment · Fixed by #326
Closed

Comments

@fpaaske
Copy link
Contributor

fpaaske commented Sep 8, 2022

Since note is included, and most apps will be missing the required entitlements for this field, no contacts will be returned in the query for the contact to delete.

In fact, I think no fields are necessary to fetch when the goal is to delete the contact.

var keysToFetch: Array<any> = ['givenName', 'familyName', 'middleName', 'namePrefix', 'nameSuffix', 'phoneticGivenName', 'phoneticMiddleName', 'phoneticFamilyName', 'nickname', 'jobTitle', 'departmentName', 'organizationName', 'note', 'phoneNumbers', 'emailAddresses', 'postalAddresses', 'urlAddresses', 'imageData']; // All Properties that we are changing

The same goes for fetch operations, the note probably shouldn't be included by default. But that's already configurable for the API-user, so it's not that critical 🙂

According to apple documentation, to access the contact notes you'll have to explicitly declare that you need to do this (with an entitlement), and I'm pretty sure you'll be going through a tougher review process if you do.

https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_contacts_notes

Before you submit an app with this entitlement to the App Store, you need to get permission to use the entitlement. Request permission at https://developer.apple.com/contact/request/contact-note-field.

@fpaaske fpaaske changed the title [@nativescript/contacs][iOS] 'note' should not be included keysToFetch during delete() [@nativescript/contacs][iOS] 'note' should not be included in keysToFetch during delete() Sep 8, 2022
@NathanWalker
Copy link
Contributor

Agreed thanks for tracking this - it’s always been chore dealing with the note capability when it’s rarely needed in common cases. Would you like to submit a PR to just remove from defaults? As you mention that can be customized per case if someone does need it.

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 a pull request may close this issue.

2 participants