I am trying to add ABAdressbook support to my IOS5 app. Been looking the documentation. I get this code where we create a ABAdressbook instance using:
ABAddressBook *addressBook;
ABPerson *newPerson;
addressBook = [ABAddressBook sharedAddressBook];
(This is from the apple documentation.)
I added the headers and the framework accordingly.
But the compiler (xcode) does not recognise ABAdressbook. This left me to wonder if this code is only good on the OSX API and not valid under IOS?
So far the working code I get always goes by creating an ABAddressBookRef using :
ABAddressBookRef addressBook = ABAddressBookCreate();
I have not found much good documentation for IOS Addressbook programming and the apple documentation is quite obscure when it come to working with groups.
So I am looking for a bit of help and a few good pointers.
Create the ABAddressBook like this ABAddressBookCreate() no longer exists.
ABAddressBookRef addressBook =ABAddressBookCreateWithOptions(NULL,NULL);
Related
I am trying to update iCal from within my iPhone app, I believe I need to use the EventKit framework but cannot find any examples. I've found a snippet of code which uses
EKEvenStore *thisEvent = [EKEventStore eventWithEventStore:eventstore];
but it wont compile, so I am missing something. If anyone can provide an example that would really help
I managed to find a site which had a tutorial which did the job for me, The site is http://mobileorchard.com/ios-advanced-programming-event-kit-framework/
How do I access iPhone contact details in my application?
Use the ABAddressBook API. There's an introduction here.
You need to use the AddressBook APIs to get iPhone's contacts. It is easy to find code snippets.
Anyone know of a wrapper for the AddressBook framework that makes it a bit friendlier to use?
Yes, Erica Sadun has developed an awesome Objective-C AddressBook wrapper framework.
I've personally used it in my projects, and I can attest that it works very well.
Check it out at Github.
I recently completed a comprehensive iOS / iPhone wrapper framework that is available on GitHub. https://github.com/heardrwt/RHAddressBook
I know of two but have not used them.
Google Toolbox for Mac
iPhoneContacts
I currently use iPhoneContacts and it works fine.
Can anyone suggest me how to work with contact importing in iOS sdk?
I mean to import the address book into my iOS application.
Rather than try to import the contacts, why don't you use the address book.
Have a look at the AddressBook Framework.
Does anyone know if iPhone (i.e. Cocoa Touch) lets you create custom properties?
I've used it with the mac before (where it works beautifully) and would like to use this technology for an iPhone app that syncs with an app on the mac through the Address Book (using MobileMe). If I can't use custom properties, however, I'll have to abandon this strategy.
For the mac, it's relatively easy: http://developer.apple.com/mac/library/documentation/UserExperience/
Conceptual/AddressBook/Tasks/AddingProperties.html#//apple_ref/doc/uid/20001026-BABHHIHC
Does anyone know if this is possible on the iPhone?
Cheers,
Gregor,
Sweden
nope, sorry, the AddressBook framework on the iPhone is woefully lacking in this regard. Also, no "me" card.