iOS project compilation

2019-08-28 06:17发布

I am working on a project accessing web service. I found a project

http://d1xzuxjlafny7l.cloudfront.net/downloads/PromoTest.zip

The above code include JSON library [project setting compiler = LLVM 4.2] And I tried to use partial code of that project in my project. So I copied the JSON library into my project [my project uses Apple LLVM 3.1] and then some error show up
eg.

SBJsonStreamWriterState **states;

//error:Pointer to non-const type "SBJsonStreamWriterState *" with no explicit ownership

I have tried using compiler flags -fno-objc-arc, no good. I wonder if its a ARC problem? if it is, then why above compiler flag wont work.

2条回答
迷人小祖宗
2楼-- · 2019-08-28 06:48

So, I solved it by deleting SBJson Library. I found Apple already written a json library.

查看更多
男人必须洒脱
3楼-- · 2019-08-28 07:01

Try disabling ARC at the target level like shown in the attached picture:

enter image description here

查看更多
登录 后发表回答