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

查看:22
本文介绍了如何更新 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天全站免登陆