Skip to content

KeyboardExtender ignores UIDesignRequiresCompatibility on iOS 26+ #1401

@qister

Description

@qister

Describe the bug

On iOS 26+, KeyboardExtenderContainerView always uses ModernContainerView with rounded corners (glass effect), even when the app has UIDesignRequiresCompatibility set to true in Info.plist. This causes the
keyboard extender to render incorrectly — with rounded edges that don't match the legacy (compatibility) UI style.

Code snippet

// KeyboardExtenderContainerView.swift — current behavior
#if canImport(UIKit.UIGlassEffect)
  if #available(iOS 26.0, *) {
    // always returns ModernContainerView, ignoring compatibility mode
    return ModernContainerView(frame: frame, contentView: contentView)
  }
#endif

To Reproduce

  1. Set UIDesignRequiresCompatibility to true in the app's Info.plist
  2. Run the app on iOS 26.2 simulator or device
  3. Open a screen that uses KeyboardExtender
  4. Observe rounded corners on the keyboard extender view

Expected behavior

When UIDesignRequiresCompatibility is true, the keyboard extender should fall back to LegacyContainerView without rounded corners, matching the rest of the compatibility-mode UI.

Screenshots

Before fix (rounded corners applied despite compatibility mode):

Image

After fix:

Image

Smartphone (please complete the following information):

  • Desktop OS: macOS
  • Device: iPhone Simulator
  • OS: iOS 26.2
  • Library version: 1.21.2

Additional context

The fix is to check Bundle.main.object(forInfoDictionaryKey: "UIDesignRequiresCompatibility") before creating ModernContainerView. See PR #1402

Metadata

Metadata

Assignees

Labels

KeyboardExtender 🧩Anything about keyboard extending (i. e. `KeyboardExtender` component)🐛 bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions