Address Book constants evaluating as zero

前提是你 提交于 2019-12-18 08:39:33

问题


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.


回答1:


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."



来源:https://stackoverflow.com/questions/1235131/address-book-constants-evaluating-as-zero

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!