Getting your app bundle version in Swift

Just a quick post, more for reference than anything else. It’s common practice nowadays as an App Developer to display the current app version somewhere in your app. Sometimes in loading screens, login screens, or in menus. It’s super easy to do this, all you need is the following code:

If your app version was 1.2.3, the above code would set the text property of a UILabel named appVersion to “v 1.2.3”.

Leave a comment