Saving Address Book References to a File

In my app, I have built a speed dial-like view very similar to the Phone.app's Favorites list. The user can add new contacts and select which number to call, but I am having issues storing the info to a file so that it can be reloaded after the app is relaunched.
Right now, I have created a wrapper class that stores the ABRecord's unique ID as well as the phone number's ID, but it won't archive to a file. Any thoughts? Should I just use a NSMutableArray with an NSMutableDictionary storing these values instead of the wrapper class?

You should get the ABRecordID of the contact and store that:
ABRecordID personID = ABRecordGetRecordID(person);
When needed use the AddressBook api to retrieve the actual record:
ABAddressBookRef addressBook = ABAddressBookCreate();
ABRecordRef abPerson = ABAddressBookGetPersonWithRecordID(addressBook, abPersonID);

Similar Messages

  • Why can't I open and retrieve my files from iPhoto and my address book after importing the files from my Power mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    Why can't I open and retrieve my files from iPhoto and my Address Book after importing the files from my Power Mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    For your addressbook, export the files to vCard on the PowerMac, then bring them over to your Mac Pro. For your iPhoto, copy the Users -> yourname -> Pictures folder to your Desktop on the Mac Pro, and open iPhoto on the Mac Pro holding the command and option keys.  Select the library file from that Pictures folder and open it.  It should import all the pictures into iPhoto as part of the rebuild process.  Other PowerPC to Intel migration issues are covered here: https://discussions.apple.com/docs/DOC-2295

  • I'm trying to import contacts from Outlook to mac address book. I've exported as a CSV but when i try to open with the Address book import tool, the file is greyed out and can't be imported

    I'm trying to import contacts from Outlook to Mac address book. I've exported as a CSV but when I try to open with the Address book import tool, the file is greyed out and can't be imported. Any ideas? 
    Thanks,
    Ian

    If you can't get the exported .csv file to work you might consider using Migration Assistant: http://support.apple.com/kb/HT2518, particular if you need to move more than just your contacts.  There is some granularity in the options on what to transfer but I'm not sure if you can choose to just your migrate contacts.

  • Saving address book

    using tb 31.2, ow to save address book or is it saved in profile? also, how to make contact groups?

    From the address book menu bar select Tools-Export
    Name the file, select the file type to save and where to save it.
    As for mailng lists click the button labeled New List.

  • Address Book, importing text tab file, custom fields not there

    Searched thru all past posts. Found some that are close but not what I am trying to do.
    Open Address Book, go into Preferences, select Template and under the Names field (friend, assistant, father, etc) I add a custom field called "Keyword".
    I also add two more custom fields in the Phone area called "Work 3" and "Work 4". There are other custom fields I need but I want to keep this short.
    Quit Address Book then relaunch. Add a new contact and the new custom fields, Keyword, Work 3 and Work 4 are there. All good so far.
    I have a Now Contact file with about 800 contacts in it. I export all fields as a Text file, Tab delimited. No problems there. With Address Book launched, select Import, pick the text file, leave Text Encoding on Automatic and click Open.
    The window that shows the fields for Address Book and fields for the text file side by side opens. This is where you match up the correct fields for importing. If I go to one of the fields from the text file that I created a custom field for, click under the Address Book heading on the Do not import, scroll thru the Apple choices of fields, none of the custom fields show up. Only the original Apple ones are there. Why does Apple let you create them in the Template area but not have them available for importing?
    That is my problem.
    Adding new contacts as I get them, is fine. Importing 800 contacts with these custom fields is not possible.
    I could map them to go to the Notes field along with actual notes but that is inelegant. The custom fields are there, why can't we use them to their full potential.
    This appears to be a bug to me. Let me know what you think.

    Hi Adam,
    Thanks, but the problem is not importing to AddressBook, it is exporting.  I did discover from another that I can export very easily to a Numbers spreedsheet.  It is exceptionally simple.  But it will not export custom fields.  Someone said that is because of a vcard standard.  My custom fields are just "name" fields that I have labeled differently.  But Numbers does not support the name (it only takes the name of the card).
    Christine

  • Address Book List Output to File

    How can I output an Address Book printed contact list to a file (instead of to my printer) so that I can do further editing on the file in Pages? Alternatively, how can I input the PDF file into Pages which can be produced by the Address Book list print function?
    Thanks for your suggestions.

    I think that Pages is the wrong choice.
    I use a program called Address Book Importer which allows me to use CSV files that can be edited in Excel (or possibly Numbers)?
    See http://homepage.mac.com/sroy/addressbookimporter/
    You will need to be very careful doing the external edits. I experienced a LOT of problems with delimiters (commas and semi-colons) in notes and business names. I had to strip ALL of the commas and semi-colons from the address book file in Excel before I could import back into Address Book.
    Be SURE to back up the Address Book (File -> Export) so you can get it back if you have a disaster in the external editor. Be sure to do a test on the reimport to make sure the fields are lining up the way you want them.
    BTW - PDF is a printer format, not a data base so it will not be possible to edit the PDF files as if it were a data base.
    Hope that helps.

  • How to Export Address Book contacts as CSV file for Gmail?

    Hi
    I wish to export some of my Address Book contacts towards Gmail (which i use through the web interface for now) but I don't want to export vcards as i don't trust big brother Google with all the other data (snail mail, phone numbers, birthdays, etc).
    I have tried to do the export through Address Book but found no CSV export option.
    I've searched the forum for an answer, but to no avail. Some other (paying) websites claim to offer solutions but the "pay before you see" deters me from using them.
    Any tip on how to do this would be greatly appreciated. Scripts and software also welcome, if shareware/freeware.
    Cheers,
    FMN

    Thanks for your answer, but gmail's help specifically states one can import contacts in CSV format and i was looking for a simple batch solution.
    Here is a link to the relevant gmail page (might be in French - am not a "Froguette" for nothing ;)) about importing:
    <http://mail.google.com/support/bin/topic.py?topic=28647>
    and the one about importing addresses as CSV files:
    <http://mail.google.com/support/bin/answer.py?hl=fr&answer=12119>)
    So my question still stands.
    FMN
    Message was edited by: FroguetteMiNote - wrong link corrected
    Message was edited by: FroguetteMiNote

  • Address Book and iCal Data Files

    In the standard Snow Leopard installation, what are the names of the data files for Address Book and iCal, and where are they stored? I have so much data in these two files that I want to be sure they're closely backed up.

    you should back up your whole system not just those two files. then you'll never miss anything. what's your backup setup?
    the address book data is stored in home directory/library/application support/address book and the ical data in home directory/library/calendars.

  • Saving a book as a PDF file in 5.04 becomes a preview file

    In iphoto 4 i would create lovely books then save as a PDF file which saved as an Acrobat Reader file and opened up just like a book. when i save as a pdf i am getting a preview file
    not what i want! how do i get the acrobat reader back?? anyone????

    Slideshow can be saved as QT movies but they would be way to big to email. If you can get them to a Windows machine it can view them if they have Quicktime for Windows installed. It's a free download from apple.
    There's two ways to backup your library. The first is to save the entire iPhoto Library folder intact. Obviously that will keep all of your data intact, meta, iPhoto organizational, etc. It has to be small enough to be saved to a CD or DVD disk.
    The other way is to burn to disk from within iPhoto portions of the iPhoto library, by albums or rolls, to disk. This will preserve any keywords, comments, and other organizational information that is in iPhoto.

  • Major help needed! Saving iPhoto book as a working file

    I am a student teacher and I am teaching a lesson on Friday that uses iPhoto book. My cooperating teacher has asked me to create an iPhoto book template for the students to use to make the activity easier for them. I have created the template book but realized I have no idea how to save it as a working file that can be transferred from one computer to the students' laptops.
    I know there are some tutorials from a user named Old Toad for this; however, I am not typically a mac user, so I found those directions sort of confusing. I need very clear and explicit directions on how to do this if I can. Thanks so much.

    Welcome to the Apple Discussions.
    The Photobooks are templates.
    The only way to move a book to another computer is to move the Library that contains it. This is because the book is an entry in the database and there is no ay to share it.
    Regards
    TD

  • How to configure Growl notifications for File Sharing and Address Book...

    Heya,
    So my team and I constantly add new contacts to Address Book and drop files via File Sharing and I would love a way to push growl notifications to people's computers when these actions occur. Or even send emails. Does anyone know how I could accomplish this? If so, can you reference a tutorial or guide of some sort? Thanks!

    The export function from iCloud creates one single .vcf file with all the addresses in it. If you click on it on the desktop, it starts displaying each and every address as a separate vCard. However, "Tools/Import...Address Books...vCard file" doesn't do anything.

  • Address Book to .csv File

    I am using Apple Mail linked to my gmail account and I am looking for an easy way to convert my contact list in Address Book into a .csv file to import into gmail. Recently, all of my emails have ended up in the Spam folder because I do not have a contact list at my gmail account. You can import .csv files into gmail but I don't want to recreate all of my contacts.

    Thank you, merci, gracias!!!
    I went through this a couple of years ago and somebody wrote a program for me, but I lost it. Here it is online.
    For my purposes, since I'm using MS Excel for Mac is that I select the csv Tab and click add header line. I then rename my .csv file .txt. I then open it in Excel letting Excel know it's a tab deliminated file.
    Voila!!
    MBee

  • Export Address Book using CSV file to Verizon Webmail

    I need to export the contents of my address book using a CSV file format which is compatible with Verizon Webmail.
    Verizon Webmail will not acknowledge any other format other than CSV and reject my attempts to use Mac sys tem formats.
    Help.... Chan

    I need to export the contents of my address book using a CSV file format which is compatible with Verizon Webmail.
    Verizon Webmail will not acknowledge any other format other than CSV and reject my attempts to use Mac sys tem formats.
    Help.... Chan

  • Exporting Address Book to .csv file

    I am trying to export my contacts from Address Book to a ".csv" file. The only export options I am seeing are "Export vCard file..." and "Back-up Address Book". I find it very hard to believe that there isn't a way for me to extract my contacts and view them in a spreadsheet format. Does anyone have any insight on this?

    Hi aritschfox, and a warm welcome to the forums!
    Might give this a try...
    http://www.apple.com/downloads/macosx/internet_utilities/addressbooktocsvexporte r.html

  • How to make an Excel file from Contacts in Address Book?

    I'd like to save the contents of my Address Book in an Excel file. How do I do it. Address Book doesn't seem to export to a common SS format.
    Thanks!

    Build an Automator workflow that gets the Contacts you want (like Get Selected Contacts), then add a Get Contact Info and select the items you want. Set the Export format to Spreadsheet (tabs).
    Then, add an action to create the new file (New Text Edit Document).

Maybe you are looking for