fastlane-old / codes

Create promo codes for iOS Apps using the command line
https://fastlane.tools
MIT License
102 stars 11 forks source link

Fail when app is not available in the US App Store - Known fix #17

Closed ohoachuck closed 9 years ago

ohoachuck commented 9 years ago

It appears that Apple search API use US as default country. If the app is not available in the US AppStore, then search API can't find it.

Steps to reproduce when searching to an app that is not available on US AppStore: https://itunes.apple.com/lookup?id=338986109 => search API does not find the app. https://itunes.apple.com/lookup?id=338986109&country=FR => search API does find the app.

A possible (probably) easy fix would need to add an extra option for country (-c || --country) in codes and update iTunesSearchApi.fetch* to include country if specified.

I'm sorry, my ruby is very basic (to not say null) and I'm afraid it's safer that you guys fix it directly in stead of me firing a risky pull request. :(

Olivier.

lacostej commented 9 years ago

lacostej/fastlane_core@78f3f0c20fe86f6e0aa31e40877f09389afdec08 could provide the support for this in fastlane_core

ohoachuck commented 9 years ago

Hello, you might have missed a #{suffix} for fetch_url("https://itunes.apple.com/lookup?bundleId=#{app_identifier}") see screenshot.

screen shot 2015-08-31 at 17 53 12

Olivier.

lacostej commented 9 years ago

I had forgotten it. Already fixed on the latest PR:

https://github.com/fastlane/fastlane_core/pull/29

:)

lacostej commented 9 years ago

Fixed by #19

KrauseFx commented 9 years ago

Thanks @lacostej :rocket:

ohoachuck commented 9 years ago

Coo, thanx!