且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以将WidgetKit扩展添加到目标iOS< 14吗

更新时间:2022-03-17 08:55:41

是的,您可以在iOS13 Xcode项目上开发微件. 您可以在运行iOS14的iPhone上看到它们,而不能在iOS13上看到它们. 您只需要在代码中添加@available(iOS14),因为您正在使用WidgetKit.但是不用担心,Xcode会很好地提醒您. 这是WidgetKit框架,在iOS14,iPadOS14或macOS11下不可用.

Yes, you can as I develop the Widgets on an iOS13 Xcode project. You can see them on an iPhone that runs iOS14 and not on the iOS13 one. You just need to add @available(iOS14) in your code because you are using WidgetKit. But don't worry, Xcode will remind it to you nicely. This is the WidgetKit framework that is not available under iOS14, iPadOS14 or macOS11.