Search code examples
ios6xcode4.5

runtime exception after upgrade to Xcode4.5 iOS6 Base SDK


I recently upgraded my codebase to use iOS6 Base SDK - I am using XCode 4.5. I only had to change the dylibxml2.2.3.7 to dylibxml2.2. It works fine on the 6.0 simulator. I am using libs like GoogleAnalytics, Three20.

But when i run the code on iOS 5 (iPhone4), it crashes at launch with this following error:

I can't tell where it is exactly crashing because all I see is the machine codes when it crashes

dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic

Referenced from: /Users//Library/Application Support/iPhone Simulator/5.0/Applications//

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation


Solution

  • I meet the same error too when building my own lib and run it in my sample code. After reading the build log carefully, I figure out the reason now.

    I set my deployment target to iOS 3.0, but the latest Xcode only support iOS 4.3 and later. So the compiler automatically set the deployment target to iOS 6.0, which generates error whenever the project is running under iOS 6.0. I fixed it by setting the deployment target to iOS 4.3 in my lib project.