开发者

Illegal iphone api function usage

Can I use objc_getClassList and class_getSuperclass in my iPhone application? Why "objc/objc-runtime.h" is not prese开发者_C百科nt when compiling for the device? PS: Actually I am using 4.2 SDK


For objc_getClassList not working on the device, I believe the problem is that the class definitions are in a static library, so you must add the -ObjC flag to the linker. The result of doing this is that the "entire" static library that defines a particular class will be loaded. See this link from Apple

According to Apple's runtime reference, you should use "superclass" instead of class_getSuperclass

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜