0

I'm looking for an easy way to store contact details from a webapp to iPhone contacts. The UX of this flow from a webapp is far from optimal, therefor I'm looking to utilize App clips in order to do so. From reading the documentation it seems like there is no option to save to phone contacts. Does someone know if this is possible?

Sharing data App clip documentation

Access limitation App clip documentation

Thanks

nheimann1
  • 2,348
  • 2
  • 21
  • 33

2 Answers2

1

Long story short, Apple is severely limiting the ability of an App Clip to get at sensitive information (of which the contacts are one of the "sensitive" items)...won't know for sure till they start shipping iOS 14, but you can test it out by setting up a app clip that uses ABAddressBook to set up a new contact and see if it will work. Either A) it won't, or B) it will prompt for permission from the user.

How to use ABAddressBook to do that is explained in this thread

Benjamin B.
  • 521
  • 7
  • 15
1

Unfortunately, the answer is still no as of March 2022. If you try to execute a CNSaveRequest, you'll get an error like:

Error Domain=CNErrorDomain Code=100 "Access Denied" UserInfo={NSLocalizedFailureReason=This application has not been granted permission to access Contacts., NSLocalizedDescription=Access Denied, NSUnderlyingError=0x283981680 {Error Domain=CNContactsFoundationErrorDomain Code=7 "(null)"}}

If you try to request permission, you'll get the same error. By the documentation, I thought maybe there was a chance you could write 1 contact (but not read contacts, thus preserving privacy), but having just written a little test app, that's not the case.

wildcat12
  • 975
  • 6
  • 13