简体   繁体   中英

Xcode 4.4, build app with ARC for iOS 4.2

Xcode 4.4, Mountain Lion, llvm 4.0 compiler. I build my app, it works on ios5, ios6 devices, but on iphone 3g with ios 4.2 I have such error:

dyld: lazy symbol binding failed: Symbol not found: _objc_storeStrong
Referenced from: /var/mobile/Applications/68B78A19-71E6-4BDA-B997-B7DED4D02429/iGuides.app/iGuides
Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_storeStrong
Referenced from: /var/mobile/Applications/68B78A19-71E6-4BDA-B997-B7DED4D02429/iGuides.app/iGuides
Expected in: /usr/lib/libobjc.A.dylib

On Xcode 4.3 everything was working, because I use only strong and unsafe_unretained modifiers.

I see, that no arc libs were linked to my app.

I was trying to link manually with libarclite_iphoneos.a, no reaction. I added -fobj-arc to link flags, no reaction.

I thought, that iPhone 3g support will be dropped in XCode 4.5, not 4.4. Is it so?

I've just found problem. Error was because of iRate library, when I remove reference to this lib, everything starts working.

Upd: after updating to last version everything works nice. Thank you @Nick Lockwood for explanation: on iOS arclite lib loads after [class load] methods executed. So you need to delay initialization. In iRate he inserted performOnTheMainThread in load method.

尝试在其他链接器标志中添加-fobjc-arc

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