【问题标题】:Catalyst: UIReferenceLibraryViewController missing in UIKit?催化剂:UIKit 中缺少 UIReferenceLibraryViewController?
【发布时间】:2020-09-26 19:41:35
【问题描述】:

在我的 iOS 应用程序中,我使用 UIReferenceLibraryViewController (UIKit) 在字典中查找单词。工作正常。在为 Catalyst 构建时,我得到:

Showing Recent Issues
Undefined symbol: _OBJC_CLASS_$_UIReferenceLibraryViewController

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_UIReferenceLibraryViewController", referenced from:
      objc-class-ref in WoordvinderViewController.o
      objc-class-ref in AnagramViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

UIReferenceLibraryViewController 只是从 UIKit 框架中丢失,还是我丢失了什么?

Apple 的代码级别支持告诉我报告错误...嗯.. 错误报告中的反馈,但错误报告未被确认。 Xcode 12 beta 没有修复它,Xcode 12 也没有发布。

【问题讨论】:

    标签: xcode uikit mac-catalyst


    【解决方案1】:

    尽管文档说它受支持,但尚未为 Catalyst 实现该类。我什至在/System/iOSSupport/System/Library/PrivateFrameworks/UIKitCore.framework/Versions/A/UIKitCore 处检查了 UIKit 的 macOS 端口,但没有发现对该类的引用。

    我想目前唯一的解决方案是创建一个 macOS 插件,通过调用 NSView.showDefinition() 来显示本机查找弹出框。

    【讨论】:

    • 谢谢!我可能会省略 Mac 版本中的定义查找,直到 Apple 找到宝贵的时间来解决这个问题。这只是一些额外的东西,而不是我的应用程序的核心。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-08
    • 2020-01-05
    • 2020-12-14
    • 2013-04-10
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    相关资源
    最近更新 更多