You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fixed this issue yesterday, but it looks like not this component issue, it's iTunes API's issue.
If you check the provider, you will find that the countryCode is all uppercase like "AU", the funny thing is if you put AU into query url like https://itunes.apple.com/AU/ookup?bundleId=${packageName}, it returns the previous version, for example, 1.2.33.
But as I release the new version 1.2.34 in the morning that query still returns me 1.2.33
If the query is https://itunes.apple.com/au/ookup?bundleId=${packageName}, lowercase au. That can return 1.2.34
So the solution is we provide country as the parameter.
like VersionCheck.getLatestVersion({country:'au'})
Reacted by Jere Rutter, thanhluantl2304, Jared, philippe-ftx, Lucas Lima, Cory Robinson, Baron Ch'ng, Gabriel Vitali, Taehyun Kim, Nataliia Tolstikova and 2 more
Reacted by Andrés Godínez, Ivan, Nataliia Tolstikova and Dimitris Greasidis
Reacted by Eduardo Marangoni and Nataliia Tolstikova
@antonioreyna I just had a test on android for this function, it worked quite well (really late response, I know, I only came across this repo yesterday) 😄
Hi, I have tried to do the three methods that you comment before and I had the same result: undefined.
Searching from google i found this example https://itunes.apple.com/lookup?bundleId=${bundleId}&country=${countryCode} which give me the version and others values like appName, appDescription, minimumOsVersion, currency and +20 more values...
I think the way to take the version from the App Store (provider: 'appStore') has changed and this library doesn't update this.
Activity
jessejiang0214 commentedon Feb 14, 2020
Hi @ChandreshRana ,
I fixed this issue yesterday, but it looks like not this component issue, it's iTunes API's issue.
If you check the provider, you will find that the countryCode is all uppercase like "AU", the funny thing is if you put AU into query url like https://itunes.apple.com/AU/ookup?bundleId=${packageName}, it returns the previous version, for example, 1.2.33.
But as I release the new version 1.2.34 in the morning that query still returns me 1.2.33
If the query is https://itunes.apple.com/au/ookup?bundleId=${packageName}, lowercase au. That can return 1.2.34
So the solution is we provide country as the parameter.
like VersionCheck.getLatestVersion({country:'au'})
thanhluantl2304 commentedon Mar 14, 2020
Thanks @jessejiang0214! But that should be added to the documentation! :D
antonioreyna commentedon Jun 3, 2020
yes same here, it worked defining the country manually at least for ios i need to check if for andorid
gabcvit commentedon Feb 18, 2021
@antonioreyna I just had a test on android for this function, it worked quite well (really late response, I know, I only came across this repo yesterday) 😄
aperomingo commentedon Apr 15, 2021
Hi, I have tried to do the three methods that you comment before and I had the same result: undefined.
Searching from google i found this example https://itunes.apple.com/lookup?bundleId=${bundleId}&country=${countryCode} which give me the version and others values like appName, appDescription, minimumOsVersion, currency and +20 more values...
I think the way to take the version from the App Store (
provider: 'appStore') has changed and this library doesn't update this.My code:
iosUpdateUrl = https://itunes.apple.com/lookup?bundleId=${bundleId}&country=${countryCode}
With this 2 methods i know if i have to display the update app flow or not
Used libraries versions
"react-native-version-check": "^3.4.2"(latest actually)"react-native": "0.63.3"Source: https://medium.com/usemobile/get-app-version-from-app-store-and-more-e43c5055156a
aperomingo commentedon Apr 19, 2021
Update: previous method doesn't work on iOS Release (App Store) but yes on Debug and Release using simulator/physical iPhone... Android is OK
On testing now:
TomasBarry commentedon Mar 9, 2022
Is the issue not with this line?
Unpacking that:
https://itunes.apple.com/${countryCode}lookup?bundleId=${opt.packageName}&date=${dateNow}Can become (removing
datefor simplicity):https://itunes.apple.com/GBlookup?bundleId=com.XXX.YYYLook at the
countryCodethough, there's no/between it and thelookupURL parameter.I've verified that putting a
/aftercountryCodeand beforelookupdownloads the JSON as expected so the fix is to amend that fetch to be:That is what I'd suspect? Can you confirm @kimxogus
harshsanghani commentedon Apr 15, 2022
I did this and it works
sachiotomita commentedon Aug 5, 2022
the example to get latestVersion for iOS
( fetch from API
BraveEvidence commentedon Feb 26, 2023
This will help https://www.youtube.com/watch?v=q3-Mrwd1Vm0