iosswiftiphoneswiftuisf-symbols

Some SFSymbols not appearing on older iOS versions even when targeted


I forked a year old code base from a production Deaf assistant app that works perfectly fine. Then I created a conference live captioning app build using the lastest Xcode version, while all settings stayed the same. All the functionality works fine in the new app that has minimum target framework of iOS 14, but I noticed that some of the icons from the SF symbols are messed up in one of my test devices running iOS 14. They worked perfectly fine in the debug build when I installed on a simulator through Xcode.

Have you faced this issue? What do you recommend I can do to debug further?

On the tutorial page screenshot below, this is what was supposed to display the icon

HStack{
    Text("\(Image(systemName: "bell.and.waveform.fill")) ")
                        .foregroundColor(Color("SecondaryColor"))
    Text(NSLocalizedString("Conference - Connect with streams in the conference rooms to get the live captions", comment: "CONFERENCE") + "\n") // TODO: Use idiom instead of device
                        .font(Font.custom("Avenir", size: 18))
                        .foregroundColor(Color("SecondaryColor"))
}

Missing in-line icons from text Missing sf symbols from list icons Missing Navbar icon


Solution

  • As mentioned in the comments, you have to be very careful when choosing which SF symbols you use in the app. The minimum SDK version doesn’t take care of the SF Symbols logic, and so some SF symbols only appear on newer OS versions.

    Even though my app minimum SDK version is 14.0, I downloaded the app from the App Store on an iOS 14.5 app and it didn’t support those specific symbols that are not appearing. When opening the app on the latest iOS 16.5, they do appear.

    As @HangarRash pointed out, you can check the SF symbols app to see the SF Symbols version availability. Tap on the SF Symbol version to get details on OS version Screenshot from the SF Symbols app Screenshot Expanding the versioning for more details

    As @0101, noted in the comments "in the case of symbol not being supported, they can be exported from the SF Symbols app (right click > "Copy Image as") and used as SVG/PNG"