[英]iOS - Link a framework with higher deployment target than my project's
I have a Framework that I have linked to my project. 我有一个已链接到我的项目的框架。 The app builds fine.
该应用程序构建良好。 But when I try to import the framework to use in my classes, an error shows that says the framework deployment target is higher than my app's deployment target.
但是,当我尝试导入要在我的类中使用的框架时,出现错误,表明框架部署目标高于我的应用程序的部署目标。 Do I have to change my app's deployment target to match that of the framework?
我是否需要更改应用程序的部署目标以匹配框架的目标? Or is there a workaround that lets me keep supporting old iOS versions while still be able to use the framework?
还是有一种解决方法可以让我继续支持旧的iOS版本,同时仍然能够使用该框架?
Think about it. 想一想。 The framework could be using features, libraries available in the later deployment of iOS, that aren't in the deployment of iOS you are using.
该框架可能使用的功能,库在以后的iOS部署中可用,而在您正在使用的iOS部署中不存在。 So yes you'll have to change your app's deployment target if you want to use this framework.
因此,是的,如果要使用此框架,则必须更改应用程序的部署目标。
Although you can conditionally import a framework based on iOS version Conditionally import a framework (such as Speech) based on iOS Version in Swift? 尽管您可以有条件地导入基于iOS版本的框架,但有条件地导入基于iOS版本的Swift框架(例如Speech)? but then of course you'll need a solution for the versions of iOS which the framework doesn't work for.
但是,当然,您将需要针对该框架无法使用的iOS版本的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.