GCKeyboard reports a phantom “Generic Keyboard” on iOS 27 beta 5

Update: Please disregard this report. The behavior was caused by enabling the hardware keyboard for the device in Xcode 27 beta 5’s Device Hub. This appears to expose a virtual “Generic Keyboard” to the connected physical device, causing GCKeyboardDidConnect to be posted even though no physical keyboard is attached directly to it.

Simply disabling the hardware keyboard option was not sufficient. I needed to close Device Hub and restart Xcode for the virtual keyboard to be removed and the expected GCKeyboard behavior to resume.


I’m seeing what appears to be a GameController regression on physical iPhone and iPad devices running iOS 27 beta 5.

When my app launches with no Bluetooth, USB, or Smart Connector keyboard attached, GCKeyboard.coalesced is initially nil.

Shortly afterward, the system posts .GCKeyboardDidConnect for a keyboard named “Generic Keyboard,” and GCKeyboard.coalesced becomes non-nil:

=== Initial state === GCKeyboard.coalesced: nil cannot add handler to 0 from 0 - dropping === GCKeyboardDidConnect #1 === notification.object: GCKeyboard: <GCKeyboard > 0x10b01cd00 'Generic Keyboard'> GCKeyboard.coalesced: Optional(<GCKeyboard > 0x10b01cd00>)

The phantom keyboard then appears to remain connected indefinitely.

After this happens:

  • Attaching a real hardware keyboard does not post another .GCKeyboardDidConnect.
  • Detaching the real keyboard does not post .GCKeyboardDidDisconnect.
  • GCKeyboard.coalesced remains non-nil even though no hardware keyboard is attached.

This may be interacting with the documented coalescing behavior: the connect notification is posted only for the first keyboard, and the disconnect notification only after the last keyboard disconnects. If the phantom “Generic Keyboard” remains present, a real keyboard is never considered the first or last keyboard.

Minimal observer code:

print("Initial GCKeyboard.coalesced:", GCKeyboard.coalesced as Any)

NotificationCenter.default.addObserver(
    forName: .GCKeyboardDidConnect,
    object: nil,
    queue: .main
) { notification in
    print("GCKeyboardDidConnect")
    print("notification.object:", notification.object as Any)
    print("GCKeyboard.coalesced:", GCKeyboard.coalesced as Any)
}

NotificationCenter.default.addObserver(
    forName: .GCKeyboardDidDisconnect,
    object: nil,
    queue: .main
) { notification in
    print("GCKeyboardDidDisconnect")
    print("notification.object:", notification.object as Any)
    print("GCKeyboard.coalesced:", GCKeyboard.coalesced as Any)
}

I can reproduce this on both a physical iPhone and a physical iPad. This is not Simulator keyboard forwarding, and no keyboard is attached when the “Generic Keyboard” appears.

Has anyone else observed this behavior on iOS 27 beta 5 or found another API that reliably reports whether a real hardware keyboard is attached?

Filed as FB24269002.

GCKeyboard reports a phantom “Generic Keyboard” on iOS 27 beta 5
 
 
Q