Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 SwiftUI 项目的部署目标版本设置为 15.0。但是,当我尝试使用新LoggerAPI 时,我仍然收到有关 SDK 仅适用于 iOS 14 或更高版本的警告。
Logger
会不会是扩展UIImage需要一些特别的东西?我还有一些其他文件,我使用了 Logger,编译器没有抱怨。
UIImage
正如 Kiril 所建议的,问题的发生是因为测试项目的目标是 13.2。
grep 显示该project.pbxproj文件有一个13.2指定的。直接改xml文件后,问题就消失了。
project.pbxproj
13.2
(我没有注意到这一点,因为测试目标没有显示“部署信息”的地方。