获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization [英] Getting dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization on IOS4
问题描述
在iOS4上测试时出现以下错误:
I get the following error when testing on iOS4:
dyld:未找到符号:_OBJC_CLASS _ $ _ NSJSONSerialization
dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization
在iOS5上它工作正常。
While on iOS5 it's working fine.
任何帮助将不胜感激。
Any help will be appreciated.
推荐答案
来自 AFNetworking 自述文件:
如果AFNetworking可用,则使用NSJSONSerialization。如果您的应用程序针对的是此类无法使用的平台您可以在项目中包含以下JSON库之一,以便AFNetworking自动检测和使用。
"AFNetworking uses NSJSONSerialization if it is available. If your app targets a platform where this class is not available you can include one of the following JSON libraries to your project for AFNetworking to automatically detect and use."
据说,防止以下错误确保两件事
With that being said, to prevent the following error make sure of two things
- 包含JSONKit / SBJson / YAJL
- 您的部署目标低于iOS5,那样
AFNetworking
会意识到它无法使用NSJSONSerialization
并且将会回到其中一个包含的JSON解析类。
- that JSONKit / SBJson / YAJL are included
- That your "Deployment Target" is lower than iOS5 , that way
AFNetworking
would realize it can't useNSJSONSerialization
and will fall back to one of the included JSON parsing classes.
Shai。
这篇关于获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!