19

According to these comments, JSONKit does not support ARC, and not even running with fobjc-no-arc setting in an ARC environment: https://github.com/johnezang/JSONKit/issues/37

Proud Member
  • 40,078
  • 47
  • 146
  • 231
  • see this url http://stackoverflow.com/questions/10459444/json-parsing-method-not-working-for-ios4-in-iphone/10459696#10459696 – Deepesh May 21 '12 at 08:19

2 Answers2

60

You can still use JSONKit in your application with ARC.

I'm using it myself.

Select your project root in XCode 5, under Targets select your application then select the BuildPhases tab. Under Compile Sources double-click JSONKit.m and add the following compiler flags -fno-objc-arc.

Hope it helps

Cheers

Michael Ho Chum
  • 939
  • 8
  • 17
ehanoc
  • 2,187
  • 18
  • 23
  • Did you check for memory leaks using Instruments? The JSONKit developer himself said there's no guarantee it works in an ARC environment. The problems probably are the boundaries from ARC to non-ARC. – Proud Member May 21 '12 at 09:00
  • Didn't found any issues so far and i've been using it for a while. With that said, doesn't mean that there aren't any. I just haven't found any. – ehanoc May 21 '12 at 09:05
  • 2
    Worksforme too. I wonder how much @johnezang hates the fact that lazy ARC-loving devs are happily using his ARC-free and GC-free library. He might not care, but he also might introduce a feature upgrade which will absolutely not work with ARC :) – Pavel Zdenek Mar 07 '13 at 14:07
  • This was very helpful for using JsonKit and also other librabry that did not use ARC. Thanks. – marco alves Jul 31 '13 at 11:57
6

I use JSONKit in ARC project with the -fno-objc-arc in the JSONKit.m file in the compile Source settings.

And just some of the posts you linked to in your question already say it works.

rckoenes
  • 69,092
  • 8
  • 134
  • 166