iPhone OS4.0出现_OBJC_CLASS _ $ _ NSURL错误 [英] _OBJC_CLASS_$_NSURL error with iPhone OS4.0

查看:67
本文介绍了iPhone OS4.0出现_OBJC_CLASS _ $ _ NSURL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个OS3.1项目,现在需要通过SDK 4.0进行升级,但是当我尝试编译为运行3.1 Im的设备时,出现此链接器错误.

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

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

基本SDK为4.0,DeploymentTarget为3.1.我已经看到这可能是由于Apple迁移了NSURL,但是我看不到任何适用于我的情况的修复程序.

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.

有什么想法吗?

干杯,尼尔

推荐答案

这可能又是您需要弱链接框架(在这种情况下为CoreFoundation)的时候了.我在中描述了如何执行此操作答案,但重复一遍:

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:

要弱链接框架,请在Xcode中找到您的应用程序目标,对其进行检查,然后转到常规"选项卡.该选项卡的底部应是框架列表,并带有类型"列.将CoreFoundation.framework的类型从必需"更改为弱",然后重新构建应用程序.那应该解决运行时错误.

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.

这篇关于iPhone OS4.0出现_OBJC_CLASS _ $ _ NSURL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆