I am using this version lookup API for checking the updated version:
https://itunes.apple.com/lookup?bundleId=xxx.yyyyy.zzz
The result is different when i call API from mobile app, Postman and AppStore
from code, it is showing old version in xcode debug 3.0.0:
In Postman it is showing correct version 4.0.0:
In AppStore, it is also showing correct version 4.0.0:
Why it is not showing correct version when i am calling API from xcode and mobile app?
I am using alamofire:
let bundleId = Bundle.main.infoDictionary!["CFBundleIdentifier"] as! String
AF.request("https://itunes.apple.com/lookup?bundleId=(bundleId)").responseJSON { [weak self] response in
print(response.result)
}
2
Answers
Looks like a caching problem. Try to execute request ignoring cache data
Update: 14.10.2020
I am facing the same issue and I tried
urlRequest.cachePolicy
but not working for me.Below thing is works for me please check URL carefully-
This is my URL-
I Changed with this-
IF you can see in the first URL I used
http
and in the second URL, I usehttps
.Please add HTTPS and then check it works.
Cheers!