Skip to content

signing: add tvOS profiles and standalone app signing - #429

Draft
firejackson1 wants to merge 1 commit into
xtool-org:mainfrom
firejackson1:codex/tvos-signing
Draft

firejackson1 wants to merge 1 commit into
xtool-org:mainfrom
firejackson1:codex/tvos-signing

Conversation

@firejackson1

Copy link
Copy Markdown

What does this PR do?

Adds standalone development signing for an already-built iOS or tvOS .app or .ipa:

xtool sign Example.ipa --output Example-renewed.ipa --platform tvos --preserve-bundle-id
  • Adds an explicit signing platform, defaulting to iOS. tvOS requests TVOS_APP_DEVELOPMENT, selects registered Apple TVs across all device pages, and uses the tvOS Developer Services platform for app groups.
  • Adds opt-in preservation of exact app and extension bundle identifiers, including existing XTL- prefixes. The default account-scoped identifiers remain unchanged; app-group identifiers retain existing rewriting.
  • Stages a disposable copy before loading authentication, validates platform metadata and escaping symlinks, and refuses existing output paths.
  • Limits renewal deletion to a sole matching development profile, preserving unrelated platform/distribution profiles.
  • Documents registered-device requirements, account limits, and preservation limitations.

This is a focused companion to #362, based on current main and independent of that PR's build/SDK changes. Coordination: #362 (comment). It does not add device installation or automatic renewal.

How was it tested?

On Ubuntu 24.04 under WSL, Swift 6.4.1, with native libimobiledevice dependencies:

  • swift test --jobs 4: 75 tests passed (upstream baseline: 60).
  • make lint SWIFTLINT_FLAGS=--strict: 0 violations across 159 files.
  • Mock transport tests verify profile type, mixed/unknown device classes, device pagination, and matching-profile replacement.
  • Staging tests cover unchanged input, app/IPA output, archive failures, collisions, unsupported/mismatched/malformed metadata, and escaping extension symlinks.
  • CLI help/flags verified. A real previously built tvOS IPA stages and reaches the expected missing-authentication error; no output is published and its SHA-256 stays unchanged.
  • One fresh-context AI review identified two issues (escaping extension links and contradictory metadata); both were reproduced with failing tests, fixed, and followed by a passing full suite.

Validation still needed: authenticated Apple API provisioning, real codesigning and Apple TV installation/renewal, and macOS execution. The available macOS host has Swift 6.2.4 and cannot compile upstream's current await-defer syntax. This draft does not claim the resulting tvOS signature or installability has been verified.

AI tool usage

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI in writing code. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

Implementation, tests, documentation, and review were AI-assisted. No human code review has been completed; opened as a draft.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@TartanLeGrand

Copy link
Copy Markdown

Hi @firejackson1, heads-up: #326 (distribution signing with an existing .p12 and App Store/Ad Hoc profiles) also adds an xtool sign subcommand and a SignCommand.swift. Yours signs for development through the account, mine for distribution offline, so they look complementary. One option: a single xtool sign where --p12/--profile select distribution signing and the default stays your development flow. Happy to adapt #326 to whatever lands first, or to rebase on yours.

This branch has not been deployed

No deployments
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.

2 participants