Address book constants evaluating to zero

I have a program where, for certain code paths, address book constants (such as kABPersonEmailProperty, kABPersonAddressProperty) evaluate their normal non-zero value. However, if I follow a different code, all of these constants evaluate to zero.

Also, as soon as I follow the โ€œsuccessfulโ€ code, if I use problematic code, it works.

Is this some kind of compilation problem?

I could also re-issue the variable somewhere.

+4
source share
1 answer

Well, the mystery is solved. To Apple credit, the behavior is documented.

See link text

"Special considerations: the value of these constants is undefined until one of the following is called: ABAddressBookCreate, ABPersonCreate, ABGroupCreate."

+5
source

All Articles