Ios Get App Version Swift
Nsstring appversionstring nsbundle mainbundle objectforinfodictionarykey cfbundleshortversionstring.
Ios get app version swift. If let appversion bundle main infodictionary cfbundleshortversionstring as. That means autocorrect that actually works and helpful predicti. Writing swift code is interactive and fun the syntax is concise yet expressive and swift includes modern features developers love.
String swift 3 0 tested with 5 0. I was trying to figure out a way to see if all the users have upgraded their app. Here is how you can get the current version number of the app.
Swift code is safe by design yet also produces software that runs lightning fast. It s designed to give developers more freedom than ever. With the help of swift 3 programming language now it is possible to know the installation date of ios aap to get the installation date of app you have to find out the creation date of documents folder.
To get app version. 5 2 paul hudson twostraws may 28th 2019 all ios apps must store an app version number in their info plist file but there s no build in way to get that as a string you can use in your code. String present buildversion.
A powerful open language that lets everyone build amazing apps. Swift is a robust and intuitive programming language created by apple for building apps for ios mac apple tv and apple watch. I made the app to get the current version number and send it to the server.
To get the version number. String present appversion to get build version. Have a look on the code below.