iOS project compilation

左心房为你撑大大i 提交于 2020-01-17 05:45:47

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/11091059/ios-project-compilation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!