Skip to content

Crash on iOS 26 tab bars #272

@noahsmartin

Description

@noahsmartin

When trying to run some snapshot tests that work on iOS 18 on iOS 26 I get the following assertion failure:

AccessibilitySnapshotCore/AccessibilityHierarchyParser.swift:427: Precondition failed: UITabBar does not have the same number of tab views as tab items.

It looks like the code is trying to guess the location of the UITabBarButton view, and not finding it for the iOS 26 view hierarchy:

(lldb) po view.subviews[0].subviews[2].subviews
▿ 3 elements
  ▿ 0 : <_UITabButton: 0x11005e600; frame = (4 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000e5db00>>
  ▿ 1 : <_UITabButton: 0x107092a00; frame = (90 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000d19170>>
  ▿ 2 : <_UITabButton: 0x107056200; frame = (176 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000e60180>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions