UIKitForMac
进行构建时,出现以下错误-"UserNotificationsUI" is not available when building for UIKit for
Mac. You may need to restrict the platforms for which this framework
should be linked in the target editor.
#if canImport() ... #endif
无效的实例周围添加UserNotificationsUI
有人遇到类似的问题吗?
答案 0 :(得分:0)
我使用的一个封闭源第三方框架已链接UserNotificationsUI
。
生成错误是因为UIKitForMac不支持特定于移动的特定框架(如UserNotifications)。
消除第三方依赖性为我解决了这个问题。