且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取dyld:未找到符号:IOS4上的_OBJC_CLASS _ $ _ NSJSONSerialization

更新时间:2023-11-20 12:04:16

来自 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。