Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work when app not available on the US App Store #16

Closed
skol101 opened this issue Dec 13, 2019 · 8 comments
Closed

Doesn't work when app not available on the US App Store #16

skol101 opened this issue Dec 13, 2019 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@skol101
Copy link

skol101 commented Dec 13, 2019

Any lookup (by id, by app bundle id) returns null if the app isn't available on the US App Store.

Please, fix or suggest a workaround.

@larryaasen larryaasen self-assigned this Dec 15, 2019
@larryaasen
Copy link
Owner

@skol101 I assume the iTunes API is returning an empty response when the app is not available on the US App Store. In that case, there is no version of the app to upgrade, and thus there should not be a message or alert displayed to the user. Can you explain more about your issue, including the messages from the log, and possibly any screenshots?

@larryaasen larryaasen added the need more information Further information is requested label Dec 15, 2019
@skol101
Copy link
Author

skol101 commented Dec 15, 2019

The issue is that the plugin or iTunes Api call doesn't check whether app is available on other markets. For instance, if I just open https://apps.apple.com/app/id1478293930 in the browser, the App Store will open even when the app isn't available on the US app store.

@larryaasen larryaasen removed the need more information Further information is requested label Dec 15, 2019
@larryaasen
Copy link
Owner

What country codes are valid for the 1478293930 app?

@larryaasen larryaasen added the need more information Further information is requested label Dec 15, 2019
@skol101
Copy link
Author

skol101 commented Dec 16, 2019

We've made it available in the US with the recent update, though not in Russia ('ru' I believe).

@larryaasen
Copy link
Owner

This package is not designed to handle App Stores outside of US. However, it may not be that difficult to add country support. The URL used by the iTunes class is:
https://itunes.apple.com/lookup?id=1478293930
which default the county to US. When I added the query parameter country=RU,
https://itunes.apple.com/lookup?id=1478293930&country=RU
it returns no results:

{
 "resultCount":0,
 "results": []
}

This URL https://itunes.apple.com/lookup?id=1478293930&country=CA seems to return the Canadian store listing.

I may be able to get the store country ID from a plugin and use that in the URL. Let me look into that.

@larryaasen larryaasen added enhancement New feature or request and removed need more information Further information is requested labels Dec 17, 2019
@larryaasen larryaasen removed their assignment Jan 19, 2020
@larryaasen larryaasen added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 12, 2020
@hivesey
Copy link

hivesey commented Jun 5, 2020

Hi,
I would like to express interest in having this plugin working for apps in the store outside the US too. Is that fix underway?

Thanks,

@larryaasen
Copy link
Owner

@hivesey This package does not support multiple countries for iOS. It only supports the US app store at this time. However, there is a quick patch you could make if you want to support only one country that is not US. To make that patch, fork this repo, and change the following line to the country code of your choice:

_countryCode ??= 'US';

@larryaasen
Copy link
Owner

@skol101 @hivesey There is an update to this package that now supports using the country code from the locale, which merged in PR #39. Check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants