majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.37k stars 470 forks source link

Add AppleTV Support #81

Closed hxhlb closed 1 year ago

hxhlb commented 2 years ago

I modified it against #27 and it worked. The difference is that I changed the Download log level to debug and added a bit of output. Please verify.

Execution renderings: http://www.hxhlb.org/atv.png

majd commented 2 years ago

I don't really see how this adds support for downloading Apple TV apps. The changes do exactly what #27 did. The downloaded IPA package is for the iOS app and not the Apple TV app.

hxhlb commented 2 years ago

Yes, the code is the same. Maybe the App Store has been adjusted recently, but it is indeed possible to download programs for AppleTV. And I also found that when downloading, you can omit the --device-family option. The Miao Project program is only available in the AppleTV platform store, of course it is paid. Refer to the running screenshot:

http://www.hxhlb.org/atv2.png

If you have an AppleTV, you can find a dedicated AppleTV program to download and verify it. I don't know how to determine whether the downloaded ipa belongs to IPhone or iPad or AppleTV, do you have a way to verify it?

majd commented 2 years ago

I think he IPA variant that is downloaded is for the iOS version. Please verify that by looking at the CFBundleSupportedPlatforms in the Info.plist file.

hxhlb commented 2 years ago

I tested 3 APPs, 2 are exclusive to AppleTV, one is YouTubeTV, YouTubeTV's CFBundleSupportedPlatforms is iPhoneOS, and the other 2 are exclusive to AppleTVOS.

http://www.hxhlb.org/atv4.png

I also used Apple Configurator2 to test and install 2 AppleTV exclusive programs to the iPhone. After installation, they will disappear, indicating that they are not suitable for iPhone. YouTubeTV can indeed be downloaded from the iOS App Store, so the download may be the iPhone version.

majd commented 2 years ago

I see, thanks for checking. Do you have a way to test installing the ipa package to an Apple TV?

It seems that if the app was only available for tvOS, it would download that copy of the app otherwise it defaults to the iOS version. We would need to find a way to explicitly request the tvOS copy of the app for this to be usable in the tool.

hxhlb commented 2 years ago

I own an AppleTV, I'll check if I can use Apple Configurator2 to install the ipa to the AppleTV

hxhlb commented 2 years ago

I can't capture ATV's HTTPS data. Is there any way?

majd commented 2 years ago

I'm not sure to be honest. I assume you can use Xcode to install the ipa package OTA from "Devices & Simulators" window.

majd commented 1 year ago

Is this still being worked on? Otherwise, I'd close this PR for now.

hxhlb commented 1 year ago

你的邮件我收到了,有机会就看见了!

tmm1 commented 1 year ago

@hxhlb did you find any way to request tvOS ipa? if you can use Configurator to install apps maybe the request params can be seen there?