TonyHernandezAtMS
TonyHernandezAtMS

Reputation: 19

iOS Address book records existing outside of address book database

I was reviewing Address Book Programming Guide for iOS and came across this comment:

Even though records are usually part of the Address Book database, they can also exist outside of it. This makes them a useful way to store contact information your application is working with.

What does this mean? Can I create contacts that are viewable by contacts app but not stored in the shared database?

Thanks!

Upvotes: 0

Views: 108

Answers (1)

alivingston
alivingston

Reputation: 1440

A Record is just an object, so you can create one and do whatever you want with it. That statement means you can create and use an ABRecord for your own purposes without putting it into the Address Book database.

It means the opposite of what you asked - if you want a contact viewable in the contacts app, you have to put it in the Address Book database. However, if you're going to make your own contacts app (or add your own internal address book functionality), you could create and use ABRecords in your implementation.

ABRecordRef aRecord = ABPersonCreate(); will create a new record, and you can fill it out with contact information and use it internally in your app. Thus, as the snippet you found said, you can use them as a way to store contact information within your app without putting those contacts into the address book database.

Upvotes: 1

Related Questions