Swiftui 没有名为'的系统映像;机场快线';被发现

Swiftui 没有名为'的系统映像;机场快线';被发现,swiftui,sf-symbols,Swiftui,Sf Symbols,我使用的是SwiftUI SF符号,在iOS 14上运行良好,但在iOS 13上运行不好,错误如下: [SwiftUI] No system image named 'doc.badge.gearshape' was found [SwiftUI] No system image named 'airport.express' was found [SwiftUI] No system image named 'rectangle.badge.plus' was found 用法非常简单: I

我使用的是SwiftUI SF符号,在iOS 14上运行良好,但在iOS 13上运行不好,错误如下:

[SwiftUI] No system image named 'doc.badge.gearshape' was found
[SwiftUI] No system image named 'airport.express' was found
[SwiftUI] No system image named 'rectangle.badge.plus' was found
用法非常简单:

Image(systemName: "doc.badge.gearshape")
如果这是因为图标仅在iOS 14上退出,那么解决这个问题的正确方法是什么? 我是否必须使用:

if #available(iOS 14.0, *) {
        Image(systemName: "doc.badge.gearshape")
} else {
    Image("xxx")
}

你说得对。这些是从iOS 14.0添加的符号

您必须使用iOS 13.0的替代图像,正如您在上面的代码片段中所提到的那样