开发者

_OBJC_CLASS_$_NSURL error with iPhone OS4.0

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 Ap开发者_运维知识库ple moving NSURL but Im not seeing any fixes that work in my case.

Any ideas?

Cheers, Neil


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜