"UserNotificationsUI" 在为 UIKit 构建时不可用 Mac 错误
"UserNotificationsUI" is not available when building for UIKit for Mac error
- 我的应用有服务和内容扩展通知目标
支持按预期工作的丰富的远程通知
iPad/iPhone iOS 13 岁及以下
- 我已经安装了 Xcode 11-beta 和 macOS Catalina 10.15-beta
- 在使用新
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.
- 首先尝试在
UserNotificationsUI
实例周围添加 #if canImport() ... #endif
,但没有成功
- 然后删除了同样不起作用的扩展目标。
有人面临类似问题吗?
我使用的一个闭源第三方框架有 UserNotificationsUI
链接。
构建错误是因为 UIKitForMac 不支持移动特定框架,如 UserNotifications,这是正确的行为。
删除第三方依赖项为我解决了这个问题。
- 我的应用有服务和内容扩展通知目标 支持按预期工作的丰富的远程通知 iPad/iPhone iOS 13 岁及以下
- 我已经安装了 Xcode 11-beta 和 macOS Catalina 10.15-beta
- 在使用新
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.
- 首先尝试在
UserNotificationsUI
实例周围添加#if canImport() ... #endif
,但没有成功 - 然后删除了同样不起作用的扩展目标。
有人面临类似问题吗?
我使用的一个闭源第三方框架有 UserNotificationsUI
链接。
构建错误是因为 UIKitForMac 不支持移动特定框架,如 UserNotifications,这是正确的行为。
删除第三方依赖项为我解决了这个问题。