2

我最近使用 UIKit 为 iOS、iPadOS 和 macOS 构建了一个应用程序。

这个应用程序打开文件(它是一个代码编辑器)。从 Finder 打开文件时,它会出现在最近菜单中,但从应用程序菜单打开文件时,它不会出现。

我想使用NSDocumentController noteNewRecentDocumentURL(_:)手动添加它,但它在 Mac Catalyst 中不可用。

有什么方法可以将文件添加到 Mac Catalyst 上的最近菜单?

macOS 的文档(仅在 AppKit 中可用,而不在催化剂中可用):https ://developer.apple.com/documentation/appkit/nsdocumentcontroller/1514967-notenewrecentdocumenturl

4

0 回答 0