Gleb Tarasov
Gleb Tarasov

Reputation: 885

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?

Upvotes: 6

Views: 1870

Answers (2)

Gleb Tarasov
Gleb Tarasov

Reputation: 885

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.

Upvotes: 3

Johnnywho
Johnnywho

Reputation: 5539

Try to add -fobjc-arc in Other Linker Flags.

Upvotes: 1

Related Questions