简体   繁体   中英

ARC is working in iOS 6 but not work in iOS5.1

I am trying to enable ARC(Automatic Reference Count) functionality to my cocos2dbox2d application so i flow this link . ARC is enabled successfully and the application is working fine in iOS 6 but same application crash in ios 5.1. Crash report is

2012-12-01 13:33:07.753 SampleApp[6397:707] cocos2d: **** WARNING **** CC_ENABLE_GL_STATE_CACHE is disabled. To improve performance, enable it by editing ccConfig.h

2012-12-01 13:33:07.757 SampleApp[6397:707] cocos2d: cocos2d v2.0.0
2012-12-01 13:33:07.761 SampleApp[6397:707] cocos2d: Using Director Type:CCDirectorDisplayLink

dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic
  Referenced from: /var/mobile/Applications/03ACE817-3A67-456C-914A-90BC00B4AD38/SampleApp.app/SampleApp
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_setProperty_nonatomic
  Referenced from: /var/mobile/Applications/03ACE817-3A67-456C-914A-90BC00B4AD38/SampleApp.app/SampleApp
  Expected in: /usr/lib/libobjc.A.dylib

Check this image: <code>在此处输入图片描述</ code>

Any one help me...

Thanks...

If you are facing this error set your deployment target to 4.3. By default it is setting to 6(latest). Once we had all our projects and subprojects set to the same deployment target, the problem went away. If you want to enable ARC in your application you need to set deployment target as 5.0 and above.

Just ran across this problem myself. I was using Cocos2d with ARC, which meant I pulled the cocos2d code in as a library. I had the target ios set to 5.1 for the app target, but 6.1 for the cocos2d library target in the build settings. Once I set the cocos2d library to 5.1, it worked fine.

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