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

发布于 2024-10-06 20:33:13 字数 726 浏览 1 评论 0原文

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

虽然这有效,而且我确实可以从我的应用程序进行打印,但我希望能够在未运行 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 的用户。

任何帮助表示赞赏。

I'm trying to have printing in my application.

While this works, and I can indeed print from my application, I would like to be able to run my application on devices that aren't running iOS 4.2.

Even if I check the version before I run the code.

The method that prints the document has all of the classes that are being used to print.

Whenever I switch the simulator back to 4.1, I get a Symbol not found exception that displays the error:

dyld: Symbol not found: _OBJC_CLASS_$_UIMarkupTextPrintFormatter
Referenced from: /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation

I don't want to discard the users who haven't upgraded to 4.2.

Any help appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黑寡妇 2024-10-13 20:33:13

您使用哪个编译器?如果还没有,您应该切换到 LLVM GCC 或 LLVM 以支持自动弱链接,如 Marco Arment 在 支持旧版本中所述使用新 API 时的 iOS 版本

Which compiler are you using? If you haven't, you should switch to LLVM GCC or LLVM to support automatic weak linking as described by Marco Arment in Supporting older versions of iOS while using new APIs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文