Getting dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization on IOS4

后端 未结 3 2015
无人及你
无人及你 2021-01-13 09:27

I get the following error when testing on iOS4:

dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization

While on iOS5 it\'s wo

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-13 10:24

    From the AFNetworking README :

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

提交回复
热议问题