Post

Replies

Boosts

Views

Activity

Can't get correct version on App Store
Hello i develop my app which has version check function.When my app get version with source code on App Store, verison is previous version and all data are too,but my app's version distributed on App Store is 1.34.I checked the version with url on Chrome Web Browser, and it was 1.34.url: http://itunes.apple.com/lookup?bundleId=smart.edutrack.co.krWhat's wrong with this?Here's my source code.----------------------------------------------------------------------guard let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String, let url = URL(string: "http://itunes.apple.com/lookup?bundleId=smart.edutrack.co.kr"), let data = try? Data(contentsOf: url), let json = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any], let results = json?["results"] as? [[String: Any]], results.count > 0, let appStoreVersion = results[0]["version"] as? String else { return false } print(results) print("presentVersion: \(version)") print("appStoreVersion: \(appStoreVersion)") if !(version == appStoreVersion) { return true }----------------------------------------------------------------------
1
0
1.4k
Nov ’19