Thomas Clayson
Thomas Clayson

Reputation: 29935

How to give a static library a version number?

We have a static library in Xcode which we need to assign a version number to, just like in an app.

This is useful for many reasons, but mainly because if we could assign a version number we could easily build the library to a specific output folder:

Library-1.0.0

Library-1.0.1

Library-1.0.2

Library-1.1.0

Library-2.0.0

If you see what I mean.

It might also be useful for our clients to manage dependencies and such in their apps.

Is there a way that we can add a version number to the build?

Thanks for your help.

Upvotes: 3

Views: 2698

Answers (1)

Matt.M
Matt.M

Reputation: 1148

This has everything you need to know: Framework Versioning

Essentially it boils down to a few settings within the framework's Build Settings. There are Major versions and Minor versions. Major version is found in the build setting "Framework Version". It starts off with a value of "A" by default. Minor versions are set with the setting "Current Library Version".

Major versions indicate incompatiblity with previous frameworks. Minor versions indicate compatible updates to the current version.

Upvotes: 1

Related Questions