如何更新iOS应用程序中的框架? [英] How to update a framework in an iOS app?

查看:111
本文介绍了如何更新iOS应用程序中的框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Nuance的 SpeechKit 框架编写应用程序。我刚刚下载了一个新版本的框架,其中包含一些类中的新方法。为了升级,我删除了框架并重新添加了新框架。当我在Xcode中右键单击框架并单击在finder中显示时,它会显示新框架。当我在Xcode中打开框架的Headers子文件夹时,我看到了新的方法。

I'm writing an app using Nuance's SpeechKit framework. I've just downloaded a newer version of the framework that contains new methods in some of the classes. To upgrade, I deleted the framework and the re-added the new one. When I right-click on the framework in Xcode and click "reveal in finder", it shows the new framework. When I open up the "Headers" subfolder of the framework in Xcode, I see the new methods.

问题是我的类似乎仍然在引用头文件在旧位置,因为新方法在我的应用程序中不可见。

The problem is that my class seems to still be referencing the header file in the old location, as the new methods are not visible within my application.

如何正确升级框架? Xcode中的其他地方是否包含SDK的路径引用?

How do I upgrade a framework properly? Is there somewhere else in Xcode that contains a path reference to the SDK?

推荐答案

我找到了导致此问题的原因。

I found what cause this issue for us.

构建新版本时,必须更新当前库版本。
还有一个兼容版本

When you build a new version you must update "Current Library Version". There is also a "Compatibility Version"

在Xcode选择器中,您的框架目标和构建设置中搜索链接,您将在此处设置此设置。

In Xcode selector your framework target and in build settings search for linking and you will se this setting there.

我们创建了一个构建脚本,以便在每次构建时都使用此版本号。

We created a build script to bump this version number every time we build.

Xcode缓存框架并使用如果可能,缓存。这就是你需要改变这个数字的原因。

Xcode caches the frameworks and uses the cache if possible. That's why you need to change this number.

这篇关于如何更新iOS应用程序中的框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆