ipatool
ipatool copied to clipboard
Download with apple content id (trackId)
apple content id is more easier for find when user searching for app, but bundle id is not on the web page.
for eg. testflight url https://apps.apple.com/us/app/testflight/id899247664 id 899247664 is in URL, and in HTML <meta name="apple:content_id" content="899247664">
also is trackId in search result.
so user directly input the apple content id could skip the search part in download sub command, maybe?
@majd I did try display the id in the output to table style with ANSI-Colors, But this will depend on third package SwiftyTextTable I just forked and modified, so I am not sure If I should make a PR
search git result:
I'd rather not introduce a new dependency. I'm planning to revise the output format in an upcoming major version so I'll park this feature request until then.
You can turn trackId into bundleId by chaining few commands like this:
echo 899247664 | awk '{print "http://itunes.apple.com/lookup?id="$1}' | xargs curl -s | python3 -c "import sys, json; print(str(json.load(sys.stdin)['results'][0]['bundleId']))"
To download the resulting bundleId it with ipatool, just add it to the end like this:
echo 899247664 | awk '{print "http://itunes.apple.com/lookup?id="$1}' | xargs curl -s | python3 -c "import sys, json; print(str(json.load(sys.stdin)['results'][0]['bundleId']))" | xargs ipatool download -b
If you want the input to be the full url, then it would be:
echo https://apps.apple.com/us/app/testflight/id899247664 | awk -F/id '{print "http://itunes.apple.com/lookup?id="$2}' | xargs curl -s | python3 -c "import sys, json; print(str(json.load(sys.stdin)['results'][0]['bundleId']))" | xargs ipatool download -b
For ultimate convenience you can create an alias:
alias ipatoolb='f() { echo $1 | awk -F/id '\''{print "http://itunes.apple.com/lookup?id="$2}'\'' | xargs curl -s | python3 -c "import sys, json; print(str(json.load(sys.stdin)[\"results\"][0][\"bundleId\"]))" | xargs ipatool download -b};f'
and call it like that ipatoolb https://apps.apple.com/us/app/testflight/id899247664
I've ultimately decided to keep the CLI simple and not include yet another identifier as a command parameter. I'd suggest using one of the suggestions mentioned above.
@majd What would be wrong with doing so, it would be a lot more convenient to just paste in the ID show in App Store URLs rather than. I don't see why that would be a problem, its not yet another, just one that would make things much easier for users. Honestly, it should've been the one to use for ipatool instead of bundle identifier?
How would you even easily get a bundle identifier? I'm just curious what made you pick it in the first place too.