• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom Properties in Address Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom Properties in Address Book


  • Subject: Custom Properties in Address Book
  • From: Antonio Ferraioli <email@hidden>
  • Date: Tue, 2 Mar 2004 13:30:11 +0100

I was trying to add a new custom property to all the records
present in the Address Book database

i tried to follow the Address Book References and i wrote the following
code
but it has no effect (it does not crash but the structure of the
address book is not modified)

#import <Foundation/Foundation.h>

#import <AddressBook/AddressBook.h>
#import <AddressBook/ABAddressBookC.h>
#import <AddressBook/ABGlobalsC.h>


int main (int argc, const char * argv[]) {

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];


NSMutableDictionary *new = [NSMutableDictionary dictionary];
[new setObject:@"kABStringProperty"
forKey:@"MobileDeviceDescription"];
[ABPerson addPropertiesAndTypes:new];

// [[ABAddressBook sharedAddressBook] save]; // enabling this does
not work too

NSArray *properties = [ABPerson properties];
NSLog(@"properties=%@", properties);


[pool release];
return 0;
}

thank for your help
Antonio
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Custom Properties in Address Book
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Split class implementation into separate files.
  • Next by Date: Closing many windows with toolbars very slow
  • Previous by thread: Enumerations in scriptSuite and scriptTerminology files
  • Next by thread: Re: Custom Properties in Address Book
  • Index(es):
    • Date
    • Thread