Search code examples
iosframeworks

How to update a framework in an iOS app?


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.

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


Solution

  • 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"

    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 caches the frameworks and uses the cache if possible. That's why you need to change this number.