SiarheiFedartsou / fastlane-plugin-versioning

Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
MIT License
509 stars 61 forks source link

Fix for "get_app_store_version_number" for apps with limited availability #65

Closed stef-t closed 3 years ago

stef-t commented 3 years ago

I've been using get_app_store_version_number with the bundle_id parameter and came across the following error, although the provided bundle id matched the bundle id of my published app on the AppStore:

Cannot find app with #{bundle_id} bundle ID in the App Store

Trying with different bundle ids, I realized that an app's availability influences the result of the itunes lookup API:

When supplying the url parameter country with a country code to the itunes lookup API call, it will find both apps!

The pull requests, adds a new parameter country to get_app_store_version_number. If country is passed as parameter, it is added as url parameter value when calling the itunes lookup API.

stef-t commented 3 years ago

Thank you! Did you have a chance to look at the JSON parser error I mentioned above?

jdouglas-nz commented 3 years ago

@stef-t Sorry, I haven't yet -- I'll have a dig through when I get a moment !

jdouglas-nz commented 3 years ago

@stef-t - I may of led you awry slightly by saying the existing request is a good example - might be some magic in the headers and how they interact with the network mocking* (maybe content length actually) - but I simply re-cURL-ed the request for ya and it worked ! Go figure 🤷‍♂️

stef-t commented 3 years ago

Must be some header magic then. Good thing it was so easy to fix for you!

jdouglas-nz commented 3 years ago

@stef-t - once you resolve the merge conflict we can get this merged in! 🎉

stef-t commented 3 years ago

@stef-t - once you resolve the merge conflict we can get this merged in! 🎉

Done, thank you!

jdouglas-nz commented 3 years ago

@stef-t - I'll merge it in unless you want to and push out a gem the next few hours. Ty again for your contribution!