我正在开发一个在 iOS 和 macOS(Catalyst) 上运行的应用程序。该应用程序支持打开文档。
我已在 info.plist 中将 LSSupportsOpeningDocumentsInPlace 的值声明为 NO,但这不会为 mac Catalyst 目标构建。构建错误显示“macOS 不支持‘LSSupportsOpeningDocumentsInPlace = NO’。删除该条目或将其设置为 YES,并确保应用程序确实在 macOS 上打开文档。” 但此应用程序不处理原始文档,它需要复制文档。
那么有没有办法可以在 info.plist 中为 iOS 和 macOS 设置不同的值?即对于 iOS,LSSupportsOpeningDocumentsInPlace = NO;对于 macOS,LSSupportsOpeningDocumentsInPlace = YES