获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization [英] Getting dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization on IOS4

查看:154
本文介绍了获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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


  1. 包含JSONKit / SBJson / YAJL

  2. 您的部署目标低于iOS5,那样 AFNetworking 会意识到它无法使用 NSJSONSerialization 并且将会回到其中一个包含的JSON解析类。

  1. that JSONKit / SBJson / YAJL are included
  2. That your "Deployment Target" is lower than iOS5 , that way AFNetworking would realize it can't use NSJSONSerialization and will fall back to one of the included JSON parsing classes.

Shai。

这篇关于获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆