iphone - 在4.2 SDK中打印-希望支持4.0而不会导致应用崩溃

标签 iphone objective-c printing crash airprint

我正在尝试在应用程序中进行打印。

尽管这可行,并且确实可以从我的应用程序中打印,但我希望能够在未运行iOS 4.2的设备上运行我的应用程序。

即使我在运行代码之前检查版本。

打印文档的方法具有所有用于打印的类。

每当我将模拟器切换回4.1时,都会出现未找到符号的异常,并显示错误:

dyld:找不到符号:_OBJC_CLASS _ $ _ UIMarkupTextPrintFormatter
引用自:/ Users / Jack / Library / Application Support / iPhone Simulator / 4.1 / Applications / 794534DB-DB53-42E7-A294-7E78FDD3899B / Documentation.app / Documentation
预期位于:/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit
在/ Users / Jack / Library / Application Support / iPhone Simulator / 4.1 / Applications / 794534DB-DB53-42E7-A294-7E78FDD3899B / Documentation.app / Documentation中

我不想丢弃尚未升级到4.2的用户。

任何帮助表示赞赏。

最佳答案

您正在使用哪个编译器?如果还没有,则应切换到LLVM GCC或LLVM以支持自动弱链接,如Supporting older versions of iOS while using new APIs中的Marco Arment所述。

关于iphone - 在4.2 SDK中打印-希望支持4.0而不会导致应用崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4408007/

相关文章:

java - 打印 PDF 文件

iphone - 尽管设置了contentsScale,为什么CAShapeLayer仍然太大?

iPhone 4 为元素添加黄色条纹

iOS Autolayout 让标签位于图像之上

ios - UITableViewCell detailTextLabel 从不显示

ios - 从 App-delegate 重新加载或运行函数

iphone - UrbanAirShip 中的角标(Badge)编号未更新

iphone - 如何在编辑时更改自定义 UITableViewCell 上的缩进量?

python - 使用迭代器打印整数

internet-explorer - res :/iefram. dll 打印空白页