alexrothenberg / motion-addressbook

MIT License
89 stars 30 forks source link

AddressBook::Person now fetches the unique record id and stores it. #16

Closed wink closed 11 years ago

wink commented 11 years ago

When trying to find an existing contact, it makes more sense to be able to search by the unique record id created for that contact in the Address Book. It's guaranteed to be unique.

http://developer.apple.com/library/ios/#documentation/AddressBook/Reference/ABRecordRef_iPhoneOS/Reference/reference.html#//apple_ref/c/func/ABRecordGetRecordID

AddressBook::Person now fetches the unique record id and stores it as @uid. Also added a .find_by_uid(uid) method.

alexrothenberg commented 11 years ago

Thanks for this. You're right it does make a lot of sense. Also :+1: kudos on including specs!

I'll plan on releasing a 1.0.1 with this soon.