简体   繁体   中英

-fno-objc-arc doesn't work at runtime

I downloaded some open source libraries which don't use ARC. I added the -fno-objc-arc as suggested on SO which made them compile. However, during runtime I still get errors (that causes crash) like ARC forbids explicit use of autorelase . Am I doing something wrong ?

Click on the name of the project on the navigation view in the left side, go to Targets -> Build Phases and add -fno-objc-arc to the "compiler flags" for any relevant files.Simply remove all calls to -release. You're not allowed to call -release under ARC because the compiler will insert all the necessary retain/release calls for you.Please check your file again and clean your project....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM