英文:
Some SFSymbols not appearing on older iOS versions even when targeted
问题
我从一个一年前的生产环境中分支出了一个代码库,这个聋人助手应用程序完全正常运行。然后,我使用最新的Xcode版本创建了一个会议实时字幕应用程序,所有设置都保持不变。
新应用程序的所有功能在最低目标框架为iOS 14的情况下都正常运行,但我注意到在运行iOS 14的一个测试设备上,一些SF Symbols的图标出现了问题。当我通过Xcode在模拟器上安装调试构建时,它们运行正常。
您遇到过这个问题吗?您建议我可以采取哪些进一步的调试措施?
在下面的教程页面截图中,应该显示图标的内容如下:
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"))
}
英文:
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"))
}
答案1
得分: 0
如评论中所提到的,在选择在应用程序中使用哪些SF符号时,必须非常小心。最低SDK版本不会处理SF Symbols的逻辑,因此某些SF Symbols仅会出现在较新的操作系统版本上。
尽管我的应用程序的最低SDK版本是14.0,但我在iOS 14.5上从App Store下载了该应用程序,它不支持那些未显示的特定符号。当在最新的iOS 16.5上打开应用程序时,它们确实会出现。
正如@HangarRash指出的,您可以检查SF Symbols应用程序以查看SF Symbols版本的可用性。点击SF Symbol版本以获取有关操作系统版本的详细信息。
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论