Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Automatically updates a record of a contact's number if they have changed it.
Branch: master

Summary: Updated for iOS 5 ARC. Description: This release is only eve…

…r so slightly modified to support iOS 5 automatic reference counting. It was run through Xcode 4.2.1's Convert to Objective-C ARC... command. Release and Dealloc methods are removed and __bridge is inserted where necessary among other changes. For the UI I added a view behind all labels (in Interface Builder) to make them more readable. I also added a .gitignore file.
latest commit 327fcb62e7
@joepasq authored
Failed to load latest commit information.
.gitignore Summary: Updated for iOS 5 ARC. Description: This release is only eve…
LICENSE Initial commit. What works: Add a contact and their record ID along w…
README.textile Summary: Updated for iOS 5 ARC. Description: This release is only eve…


JPContactArchive is a project to demonstrate the use of one method: updateContact.

updaateContact uses stored values for a contact’s name, phone number, record ID and selected number index to update the phone number if it has changed.

  • The record ID is an integer that essentially stores what number a person was added to the address book. The first added contact has record ID 1.  docs
  • The number index is numbered phone number is selected. For a contact with three numbers labeled iPhone, Home and Work, work would have number index 2 (starting at digit 0).


  • Run the app with at least one contact with at least one phone number.
  • Add them using the change contact button.
  • Then leave the app and change the contact’s phone number that you selected.
  • Come back to the app and the contact’s number is updated to the new one.

If there are multiple phone numbers only the recorded one is changed as the index of that number is cached.

How to Use

Every line of code excluding the method -updateContact is probably rather useless to any given project. Take the meat of updateContact and integrate it how you wish.


  • Update to allow use of emails as necessary to support iMessage. (This is one reason why the phone number is stored as a NSString instead of NSNumber.)


I am bias to use this project for phone numbers only, as they are currently the only way to text message. You can easily adapt this to use another ABPropertyID for say, addresses if you deal with maps and contacts instead of phone numbers and contacts.

My app Bombr uses this code to automatically update changed contact numbers. As it is open source you may also use it commercially.

Something went wrong with that request. Please try again.