Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setting image for person in address book



Hello,

I want to add the image with person in address book.

I am Trying with the following code.

NSData *imageData = [[NSData alloc]
initWithContentsOfFile:@"file://localhost/volumes/DATA/image/play.tiff"]
;

ABAddressBook *ab = [ABAddressBook sharedAddressBook];

ABPerson *person =[ [[ABPerson alloc] init] autorelease];

 

...seting first and lastName;

[person setImageData:imageData];

 

[ab addRecord:person];

[ab save];

 

I am tracing program and I am not getting any value in imageData.

Can anyone tell me what is wrong with that code? Or How to set the image
for person ?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.