-
Notifications
You must be signed in to change notification settings - Fork 288
Description
The iTunes search API does not provide application version per platform, and makes mas-cli report a newer version which in fact is for another platform.
The applicaiton metadata are embedded as json in the html page from the web version of the App Store, in a <script type="fastboot/shoebox" id="shoebox-media-api-cache-apps"> tag.
This information provides the application version history per platform.
Example for application Broadcasts https://apps.apple.com/app/broadcasts/id1469995354 :
curl "https://apps.apple.com/app/broadcasts/id1469995354" | tr -d '\n' | sed -e's:.*<script type="fastboot/shoebox" id="shoebox-media-api-cache-apps">::' -e's:</script>.*::' | jq ' to_entries | .[0].value | fromjson | .d[0].attributes.platformAttributes | to_entries[] | { platform: .key , version : .value.versionHistory[0].versionDisplay } '
produces
{ "platform": "appletvos", "version": "2.3" } { "platform": "osx", "version": "2.2.7" } { "platform": "ios", "version": "2.3.3" }
which are correct regarding the different platforms.
I checked this extraction on several cases of erroneous versions reported and so far have not encountered a problem.