Strange result from Address Book
Strange result from Address Book
- Subject: Strange result from Address Book
- From: Graham Cox <email@hidden>
- Date: Tue, 4 Aug 2009 13:17:51 +1000
I'm using the following code from Uli's UKCrashReporter:
ABMultiValue* emailAddresses = [[[ABAddressBook sharedAddressBook]
me] valueForProperty: kABEmailProperty];
NSString* emailAddr =
NSLocalizedStringFromTable
(@"MISSING_EMAIL_ADDRESS",@"UKCrashReporter",@"");
if( emailAddresses )
{
NSString* defaultKey = [emailAddresses primaryIdentifier];
if( defaultKey )
{
unsigned int defaultIndex = [emailAddresses indexForIdentifier:
defaultKey];
if( defaultIndex != NSNotFound )
emailAddr = [emailAddresses valueAtIndex: defaultIndex];
}
}
<defaultKey> comes back as a reasonable looking UUID string.
<defaultIndex> comes back as 0.
<emailAddr> comes back as @"0x17C726C0" which is clearly bogus. I've
checked my own entry in the Address Book app and it's fine. The
initial "missing" email address is loaded correctly, but gets
overwritten by the hex string.
Anyone any idea what's going on?
--Graham
_______________________________________________
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:
This email sent to email@hidden