Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

Furthermore, once I follow the "successful" code path, if I take the problematic code path it works.

Is this some kind of compile linkage issue ?

I could also be over-releasing a variable somewhere.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
908 views
Welcome To Ask or Share your Answers For Others

1 Answer

Okay, mystery solved. To Apple's credit, the behavior is documented.

See link text

"Special Considerations: The value of these constants is undefined until one of the following has been called: ABAddressBookCreate, ABPersonCreate, ABGroupCreate."


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...