Permalink
Browse files

Updated

  • Loading branch information...
1 parent cd1416d commit c70773aa894fe56cdbaaaf8782e335b71f0dfe4d Erica Sadun committed Aug 21, 2009
Showing with 9 additions and 2 deletions.
  1. +4 −1 ABContactsHelper.h
  2. +4 −0 ABContactsHelper.m
  3. +1 −1 ABGroup.m
View
@@ -12,7 +12,10 @@
@interface ABContactsHelper : NSObject
-// Address Book Contacts
+// Address Book
++ (ABAddressBookRef) addressBook;
+
+// Address Book Contacts and Groups
+ (NSArray *) contacts; // people
+ (NSArray *) groups; // groups
View
@@ -10,6 +10,10 @@ @implementation ABContactsHelper
/*
Note: You cannot CFRelease the addressbook after ABAddressBookCreate();
*/
++ (ABAddressBookRef) addressBook
+{
+ return ABAddressBookCreate();
+}
+ (NSArray *) contacts
{
View
@@ -99,7 +99,7 @@ - (NSString *) getRecordString:(ABPropertyID) anID
- (NSString *) name
{
- NSString *string = (NSString *)ABRecordCopyCompositeName(record);
+ NSString *string = [self getRecordString:kABGroupNameProperty];
return [string autorelease];
}

0 comments on commit c70773a

Please sign in to comment.