Skip to content

[codex] add tvOS app download support#478

Open
Lakr233 wants to merge 3 commits into
majd:mainfrom
Lakr233:codex/download-tvos-apps
Open

[codex] add tvOS app download support#478
Lakr233 wants to merge 3 commits into
majd:mainfrom
Lakr233:codex/download-tvos-apps

Conversation

@Lakr233
Copy link
Copy Markdown

@Lakr233 Lakr233 commented May 12, 2026

What changed

  • Ported the tvOS download implementation from https://github.com/Lakr233/ApplePackage.
  • Added platform parsing and platform-aware search/lookup entities for iphone, ipad, and appletv.
  • Added tvOS download support by resolving the platform-specific external version id through Apple's MDM lockup endpoint before the store download request.
  • Added AppleTVOS package validation after patching so a tvOS download fails visibly when the package metadata does not declare tvOS support.
  • Documented the new --platform flag for search and download.

Issues

Closes #46
Related #27

Validation

  • go generate ./...
  • go test ./...
  • go build ./...
  • Real account test using local ~/.ipatool credentials: refreshed auth token, searched Infuse with --platform appletv, downloaded com.firecore.infuse to /tmp/ipatool-tvos-test/infuse-appletv.ipa, and verified Payload/infuse.app/Info.plist declares CFBundleSupportedPlatforms = AppleTVOS.

No credentials, cookies, account files, or downloaded IPA files are included in this PR.

@Lakr233 Lakr233 force-pushed the codex/download-tvos-apps branch from a34db02 to f039b44 Compare May 12, 2026 03:12
@Lakr233 Lakr233 marked this pull request as ready for review May 12, 2026 03:18
Comment thread pkg/appstore/appstore_platform_version_lookup.go
@ZomkaDEV
Copy link
Copy Markdown

Is it possible to add support for viewing version ids for tvOS apps?

@Lakr233
Copy link
Copy Markdown
Author

Lakr233 commented May 18, 2026

It's not gonna be made in this PR.

Comment thread pkg/appstore/appstore_download.go Outdated
Comment on lines +44 to +49
if externalVersionID == "" && input.Platform != "" {
externalVersionID, err = t.lookupLatestExternalVersionID(input.Account, input.App, input.Platform)
if err != nil {
return DownloadOutput{}, fmt.Errorf("failed to resolve platform version: %w", err)
}
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether we really need to branch out for the default iOS/iPadOS platform route to the new path being introduced here. Maybe it's enough to just do this for tvOS apps. What are your thoughts?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I restricted the automatic platform external version lookup to tvOS only in 5d45605. iPhone/iPad download requests now use the standard request path. Explicit --external-version-id still goes straight through. Added coverage for iPhone and iPad request payloads.

Validation: go generate ./..., go test ./..., go build ./..., git diff --check.

E2E with an authenticated account: tvOS Speedtest download succeeded and declares AppleTVOS; default Calculator download succeeded with iPhoneOS; explicit iPad Calculator download succeeded with UIDeviceFamily=2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Apple TV

3 participants