0

I'm using SwiftUI SF Symbols, all works well on iOS 14, but not iOS 13, the error is like:

[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

The usage is very simple:

Image(systemName: "doc.badge.gearshape")

If this is because the icons are exit on iOS 14 only then what's the proper way to solve this? Do I have to use:

if #available(iOS 14.0, *) {
        Image(systemName: "doc.badge.gearshape")
} else {
    Image("xxx")
}
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
William Hu
  • 15,423
  • 11
  • 100
  • 121

1 Answers1

1

You are right. These are symbols added from iOS 14.0. New symbols from iOS 14.0

You will have to use alternative images for iOS 13.0 as you have already mentioned in the code snippet above.

Subha_26
  • 440
  • 4
  • 14