• 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
Strange result from Address Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Strange result from Address Book
      • From: Graham Cox <email@hidden>
  • Prev by Date: AGRegex (was: NSString and regular expressions)
  • Next by Date: Re: AGRegex (was: NSString and regular expressions)
  • Previous by thread: Re: AGRegex (was: NSString and regular expressions)
  • Next by thread: Re: Strange result from Address Book
  • Index(es):
    • Date
    • Thread