Fix AirPlay PIN pairing on tvOS 27 - #2894
Open
JaviSoto wants to merge 1 commit into
Open
Conversation
JaviSoto
marked this pull request as ready for review
July 25, 2026 21:58
This was referenced Jul 25, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Apple-Client-Nameduring AirPlay HAP pairing./pair-pin-startand all/pair-setuprequests.Addresses the no-PIN AirPlay HAP pairing path reported in #2866.
This does not address the separate post-PIN HTTP 470 or Companion pairing failures discussed in that issue.
Background
On an AppleTV11,1 running tvOS 27.0 (
24J5325d), AirPlay pairing returned HTTP 200 and tvOS generated a four-digit passcode, but the receiver suppressed the PIN UI because the request had no client name:pyatv already carries the configured display name inside encrypted M5, but that arrives after tvOS needs the name to present the PIN. Adding
X-Apple-Client-Nameto the initial HAP pairing requests caused the PIN to appear immediately and the normal pairing flow completed successfully.This is intentionally scoped to HAP/AirPlay 2 pairing. Legacy pairing, transient authentication, verification, and module-global headers are unchanged.
Testing
/pair-pin-startand all three/pair-setuprequests.chicknvalidation pipeline successfully.AI-use disclaimer
Codex with GPT 5.6-Sol were used in the creation of this PR, but everything was reviewed by me.