[Solved] Using the Swift Contacts Framework


I think it would be best to pull from the device’s Contacts, using the Contacts Framework – in Xcode this is the Contacts.framework package. The Apple site offers some sample code that you might be able to take advantage of in your application. For that you’d need permission from the user by enabling a NSContactsUsageDescription in your info.plist. That describes to the user why you’d need access to their contacts.

As far as storing the data in a Database, I’m not sure that would be a wise decision nor one that makes sense. Consider the reasoning behind that, does this information need to be on some remote database? if your answer is no, then chances are that you don’t need to do that extra work. You might however register new users that use your application with something like Google’s Firebase if you want to manage any messages between users (for a chat app for example).

Hopefully that answers your question and helps you out in some way.

3

solved Using the Swift Contacts Framework