views:

57

answers:

1

Hi,

I have a OS3.1 project which now needs to be upgraded via SDK 4.0 But when I try to compile to a device runing 3.1 Im getting this linker error.

dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /var/mobile/Applications/E93D0DD1-18EB-4D2E-B99E-23B74EBE42CC/RacingUK.app/RacingUK Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /var/mobile/Applications/E93D0DD1-18EB-4D2E-B99E-23B74EBE42CC/RacingUK.app/RacingUK

Base SDK is 4.0 and DeploymentTarget is 3.1. Ive seen that this likely due to Apple moving NSURL but Im not seeing any fixes that work in my case.

Any ideas?

Cheers, Neil

A: 

This is probably yet another time where you need to weak-link a framework, in this case CoreFoundation. I describe how to do so in this answer, but to repeat:

To weak-link a framework, find your application target in Xcode, inspect it, and go to the General tab. At the bottom of that tab should be a list of frameworks, with a column for Type. Change the Type for CoreFoundation.framework from Required to Weak and rebuild your application. That should take care of the runtime errors.

Brad Larson
Neil Edwards