mateusfccp / update_available

Know if there's any update for your Flutter app, based on published versions.
MIT License
25 stars 16 forks source link

iOS lookup only checks US store #10

Closed SEGVeenstra closed 1 year ago

SEGVeenstra commented 2 years ago

When an iOS app is not available in the US store it will return UnknownAvailability.

Our app is only available from the Dutch (NL) store but the plugin checks only the US store (https://itunes.apple.com/lookup).

For the plugin to work for us, it should be looking at the Dutch store (https://itunes.apple.com/nl/lookup).

mateusfccp commented 2 years ago

Hello, @SEGVeenstra . Thanks for opening this issue!

I used to have a app in production in Brazil (where I am from) and we used this same lookup URL, so I was not aware that it may not work in some countries...

I am working on a update to bump the dependencies, so I may work on this issue in this same update.

SEGVeenstra commented 2 years ago

Any idea on how this can be solved?

Would it be an option to check the device's region or something and target the store for this region?

mateusfccp commented 2 years ago

Any idea on how this can be solved?

Would it be an option to check the device's region or something and target the store for this region?

I though on this, but I am afraid this may be not the ideal solution, for some reasons:

I think that the more straightforward solution is to expose this to the API as a parameter or something like this...

WDYT?

SEGVeenstra commented 2 years ago

I think that the more straightforward solution is to expose this to the API as a parameter or something like this...

Thought about this solution as well. Although it would be nice if it could be automatically determined.

To do this, we would have to ask permission to the device to read its location.

I did not mean to read the current location. I thought iOS users configure a region on their phone.

EDIT: https://support.apple.com/en-us/HT201389

SEGVeenstra commented 2 years ago

I thought iOS users configure a region on their phone.

I'm not sure if this is even accessible information though..

mateusfccp commented 2 years ago

I'm not sure if this is even accessible information though..

Looking for it, I didn't find much information except for this StackOverflow question, which answer is "you can't".

SEGVeenstra commented 2 years ago

I'm not sure if this is even accessible information though..

Looking for it, I didn't find much information except for this StackOverflow question, which answer is "you can't".

Hmm, to bad... Then maybe your parameter suggestion is best. Then the package user can figure out a way to get that information.

mateusfccp commented 2 years ago

@SEGVeenstra As soon as we merge #11 I will publish a new beta version, could you help me testing this feature?

SEGVeenstra commented 2 years ago

@SEGVeenstra As soon as we merge #11 I will publish a new beta version, could you help me testing this feature?

I think I should be able to make some time for it!

mateusfccp commented 2 years ago

@SEGVeenstra

I've published the latest version as 2.2.0-dev.1.

SEGVeenstra commented 2 years ago

Did you find somewhere what the available regions are? I know the lookup is a 'work around' because iOS doesn't offer a legit API, but I think it would help consumers of the package if they know what valid regions would be.

rkfcccccc commented 2 years ago

@SEGVeenstra

According to my observations, the available regions comply with the ISO 3166-1 alpha-2 standard. I mentioned this in the README.

mateusfccp commented 2 years ago

@SEGVeenstra Sorry to bother you, but did you manage to solve your problem using the development version?

mateusfccp commented 1 year ago

As I did not get any response from OP, I am considering this issue solved by #11, which was released with version 2.2.0. Thus, I am closing this. Feel free to reopen/comment if you feel like this hasn't been properly solved.

SEGVeenstra commented 1 year ago

Sorry, i completely forgot about this since I was removed of the project that required it.

mateusfccp commented 1 year ago

No problem, @SEGVeenstra. Thank you for the support anyway!