在 4.2 SDK 中打印 - 希望支持 4.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用哪个编译器?如果还没有,您应该切换到 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.