Can't turn off ARC for JSONkit
Asked Answered
I

2

6

Using JSONkit for a project that is ARC enabled, and having issues. I flagged the files appropriately as -fno-objc-arc and tried a build, but it is still throwing errors like ARC is enabled. Any ideas what I could be missing?

For clarity, I flagged the file in Build Phases->Compile Sources->JSONkit.m

EDIT: screen shot of the errors. These are the same errors I got before adding the flag for the file to be ignored by ARC enter image description here

Intelligencer answered 28/3, 2013 at 22:8 Comment(13)
Seems like an Xcode problem there. Have you tried cleaning and building the project again?Killian
@Killian Tried a clean and build, quit and reopen of xcode, delete the files and re-added (yes, I copied files and they are added to target)Intelligencer
@KevinBallard added a screenshot of the errorIntelligencer
What Xcode version you using?Luciano
4.6 (yay arbitrary comment minimum length limits)Intelligencer
Just a dumb comment, but why aren't you using the native JSON methods built into iOS?Washboard
@ElJay Not a dumb question :-) Need to support <5.0Intelligencer
Gotcha. Have you checked out SBJSON? I think there is an ARC compatible version of that out now (that is what I used to use before drawing the line at iOS 5 and using the native stuff.Washboard
Paste a screen shot of your build settings for JSONKit.m. Also paste in the full build command for JSONKit.o. This answer will help you find the full build command if you don't know where to find it.Solan
@ElJay JSONKit also claims to be faster than the native JSON parserSchiffman
I would have to see that to believe it. I did some benchmarking with SBJSON vs native awhile back and native was much around 3X faster with processing a 7800 record JSON array from a web-service.Washboard
@ElJay bonto.ch/blog/2011/12/08/…Schiffman
@robmayoff How do I get the build settings/build command for an individual file?Intelligencer
S
10

as you mention you have follow these steps already please set compiler flags for JSONkit.m file also -fno-objc-arc

also

if its not working then tried:-these steps

1.you can delete the App directy under ~/Library/Application Support/iPhone Simulator/6.0/Applications and ~/Library/Developer/Xcode/DerivedData

2.then you can start Xcode ; in the menubar you can find Project -> Clean!

Saxe answered 2/4, 2013 at 7:11 Comment(1)
This answer, combined with fully deleting the files and their references, then re-adding and flagging them, did the trick.Intelligencer
S
1

Try cleaning up your derived data. X-Code sometimes does not clean up build warnings/errors. Open the organizer, Projects, select your project, click on delete behind the derived data. Then do a clean build.

Stilla answered 2/4, 2013 at 9:16 Comment(1)
Thought this might of been it, but no such luckIntelligencer

© 2022 - 2024 — McMap. All rights reserved.