I ran into this issue where my RestKit(master) based app won’t run on OSX 10.6. I keep getting errors like:
Dyld Error Message:
Symbol not found: _OBJC_CLASS_$_NSRegularExpression
Referenced from: something/something/../Frameworks/RestKit.framework/Versions/A/RestKit
Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
in /Users/something/something Client.app/Contents/MacOS/../Frameworks/RestKit.framework/Versions/A/RestKit
My dev environment is Xcode 4.4 on 10.8, base SDK set to 10.8 and deploy target to 10.6. I looked into Restkit where it’s referencing NSRegularExpression(which is only available on 10.7 or later), it’s all wrapped with version check like:
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
#endif
I think this should handle the version issue? But the result is that my app only runs on 10.7 or later, but not for 10.6.
I downloaded Xcode 4.3.3 and copied 10.6 sdk to my current Xcode. I tried to set the release target of base SDK to 10.6, but it doesn’t help either.
Could someone shed some light on this? Thanks..
Well, I didn’t really get a solution for this. __MAC_OS_X_VERSION_MAX_ALLOWED only checks for your base SDK, so in my case, it always use NSRegularExpression despite my deployment target was set to 10.6.
I ended up made some changes to the if statement so that it always skip NSRegularExpression calls.
you can do something like this to get around it: