Reputation: 65015
I have a Swift-based iOS framework called BoKit. I am trying to use the BoKitVersionNumber
from BoKit.h to determine which version of the framework I am testing. Trouble is, I can't get this number to update.
I have changed the versionto 0.10 in my project settings under Build Settings -> Linking -> Current Library Version.
I have then repeatedly done a clean and rebuild. But the BoKitVersionNumber
is still 1.0, which was the default before I made the change.
Doing a grep, I can see in my project folder, that this is defined in DerivedSources/BoKit_vers.c:
$ egrep -r BoKitVersionNumber *
BoKit/BottleKit/BoKit.h:FOUNDATION_EXPORT double BoKitVersionNumber;
BoKit/build/BoKit.build/Release-iphoneos/BoKit.build/DerivedSources/BoKit_vers.c: const unsigned char BoKitVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:BoKit PROJECT:BoKit-1" "\n"; const double BoKitVersionNumber __attribute__ ((used)) = (double)1.;
But I can't seem to get that file to change.
What am I missing?
Upvotes: 3
Views: 774
Reputation: 4377
What you want to change is the project version (CURRENT_PROJECT_VERSION
) in the Linking section of your target's build settings.
Be aware that Apple only allows Major and Minor version numbers for the BoKitVersionNumber
. Even if you specify a project version of 1.2.3
the BoKitVersionNumber
will show just 1.2
. The BoKitVersionString
on the other hand will reflect the correct version number, in your case const unsigned char BoKitVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:BoKit PROJECT:BoKit-1.2.3"
.
You might also want to have a look at the Versioning section of the Frameworks Programming Guide.
Hope that helps!
Upvotes: 3