Quantcast
Channel: Check if my IOS application is updated - Stack Overflow
Viewing all articles
Browse latest Browse all 9

Answer by alexcristea for Check if my IOS application is updated

$
0
0

I've created BundleInfoVersioning swift package to help me solve this issue.

It works with all keys in the info dictionary, like CFBundleVersion or CFBundleShortVersionString and with custom key paths like, for example, NSAgora/DatabaseVersion.

Examples:

let bundleInfoVersioning = BundleInfoVersioning(bundle: .main)bundleInfoVersioning.check(forKeyPath: "CFBundleVersion") { (old: String?, new: String?) in    if old == nil {        Analytics.install(version: new)    }    else {        Analytics.update(from: old, to: new)    }}bundleInfoVersioning.check(forKeyPath: "CFBundleShortVersionString") { _ , newVersion in    self.showWhatsNew(in: newVersion)}bundleInfoVersioning.check(forKeyPath: "NSAgora/DatabaseVersion") { (old: Int?, new: Int?) in    self.resetDataBase()}

You can check it out on github at https://github.com/nsagora/bundle-info-versioning.


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>