Xcode 4.4, ARC build app for iOS 4.2

Xcode 4.4, Mountain Lion, llvm 4.0 compiler. I create my application, it works on ios5, ios6 devices, but on iphone 3g with ios 4.2 I have this 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 

In Xcode 4.3, everything works because I only use strong and insecure modifiers.

I see that no arc libraries were associated with my application.

I tried to manually link to libarclite_iphoneos.a, no reaction. I added -fobj-arc to bind flags, no reaction.

I thought iPhone 3G support would be removed in Xcode 4.5, not 4.4. This is true?

+6
source share
2 answers

I just found a problem. The error occurred due to iRate , when I delete the link to this library, everything starts to work.

Update: after updating to the latest version, everything works well. Thanks to @Nick Lockwood for the explanation: on iOS, the arclite lib loads after the [class load] methods. Therefore, you need to delay initialization. In iRate, he inserted performOnTheMainThread into the boot method.

+3
source

Try adding -fobjc-arc to other linker flags.

+1
source

Source: https://habr.com/ru/post/922515/


All Articles