RTL Layout Issue on iPhone Duo Simulator (iOS 27.1) When Switching App Language to Arabic

Hello Apple Developer Community,

We are adapting our UIKit-based iOS application for iPhone Duo and have encountered an unexpected layout issue when switching the app language to Arabic. We would appreciate any guidance from Apple engineers or developers who have experience with RTL layout behavior on this device form factor.

Environment
  • Device: iPhone Duo Simulator
  • OS: iOS 27.1 (official release, non-beta)
  • Xcode: 27.1 (official release, non-beta)
  • Framework: UIKit
  • Layout system: Auto Layout
  • Device system language: English (LTR)
  • App language: Arabic (RTL)
Problem Description

Our application supports changing the app language independently of the device's system language.

When the system language is English and the app language is Arabic, we configure the semantic content attributes of several UIKit classes globally:

let cAttribute: UISemanticContentAttribute =
    language.isRTL ? .forceRightToLeft : .forceLeftToRight

UIView.appearance().semanticContentAttribute = cAttribute
UIButton.appearance().semanticContentAttribute = cAttribute
UICollectionView.appearance().semanticContentAttribute = cAttribute
UITableView.appearance().semanticContentAttribute = cAttribute
UITableViewHeaderFooterView.appearance().semanticContentAttribute = cAttribute

After applying these settings, we observe a large, unexpected blank area along the left side of the interface on the iPhone Duo simulator. Multiple screens are affected, and views positioned using Auto Layout appear to leave additional space on the left, resembling an unexpected safe-area inset or margin.

When the app language is English, the layout behaves as expected. The issue occurs when the app language is Arabic while the device system language remains English.

We have not yet determined whether this is related to semantic content attributes, trait propagation, Auto Layout, safe-area behavior, or a device-specific layout consideration.

Questions
  1. Is using UIAppearance to set semanticContentAttribute globally a recommended approach for app-level RTL language switching in UIKit?

  2. Could this configuration affect safe-area insets, layout margins, or Auto Layout behavior on iPhone Duo?

  3. Would traitOverrides.layoutDirection be a better approach for controlling the layout direction when the app language differs from the system language?

  4. If traitOverrides.layoutDirection is appropriate, where should it be applied—for example, on the root view controller or a container view controller—to ensure that the intended layout direction propagates correctly to descendant views?

  5. Are there any iPhone Duo-specific layout behaviors or known issues that developers should consider when implementing RTL support?

  6. What implementation strategy does Apple recommend for supporting in-app language switching between LTR and RTL languages in an existing UIKit application?

Our goal is to support Arabic and other RTL languages reliably without introducing unintended spacing or layout changes, while keeping the device's system language unchanged.

Any suggestions, documentation references, sample code, or insights into the underlying behavior would be greatly appreciated.

Thank you for your time and help!

Best regards,
iOS Development Team

I would start by narrowing down whether this is a direction issue or an inset issue. A blank strip on one side usually means a view's frame, safe area, or layout margins changed; RTL by itself shouldn't add an arbitrary margin.

Using UIAppearance to force the direction globally can make it hard to see which view is responsible, especially when the app switches languages while already running. As a test, remove those appearance settings and apply the direction at the app's root view/controller, then recreate the affected screen after the language change. On SDKs that support it, try a layout-direction trait override on the root controller and check that the intended direction reaches the affected descendants. Apple notes that a view's effective layout direction doesn't necessarily propagate through every part of its subtree: https://developer.apple.com/documentation/uikit/uiview/effectiveuserinterfacelayoutdirection

Also log the affected view's frame, safeAreaInsets, layoutMargins, and effectiveUserInterfaceLayoutDirection in English and Arabic. Check that horizontal constraints use leading/trailing rather than left/right, and test after dismissing and recreating the screen. If the left gap remains, temporarily disable the appearance proxy settings one class at a time; that should identify whether a specific UIKit class is involved. UISemanticContentAttribute is intended to describe how a view's content should behave in RTL, so it may not be appropriate to force every view to the same value: https://developer.apple.com/documentation/uikit/uiview/semanticcontentattribute

If you can share a small view-controller example and those inset values from both runs, it will be much easier to tell whether this is an app-level constraint issue or something specific to the Duo simulator.