Created
November 20, 2019 08:15
-
-
Save SergLam/80d0ba65c457e11cd2a97131d1d738d5 to your computer and use it in GitHub Desktop.
Check iOS app version info via App Store request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Perform URL request | |
// http://itunes.apple.com/lookup?bundleId=YOUR_APP_BUNDLE_ID | |
// TXT-file with JSON data will be downloaded | |
// Parse it, fetch version key-value | |
// "version":"1.5" | |
// Compare it with your current app version | |
let appVersion = Bundle.main.infoDictionary["CFBundleShortVersionString"] as? String | |
let buildNumber = Bundle.main.infoDictionary["CFBundleVersion"] as? String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment