Posts

Post not yet marked as solved
1 Replies
1.1k Views
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 }----------------------------------------------------------------------
Posted
by 0427hjy.
Last updated
.