Skip to content

View introspection gives zero height on Xcode 26 for any iOS version on v26.0.0 release #498

@gabriele-dechit

Description

@gabriele-dechit

Description

Introspecting any view with the .view IntrospectableViewType returns zero height on Xcode 26 with any iOS version when using v26.0.0 release.
By using Xcode 16.4 instead it returns a valid value.

.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { view in
    debugPrint("HEIGHT: \(view.bounds.height)") // <-- here I got 0 on Xcode 26
}

Checklist

Expected behavior

It should return a non zero value.

.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { view in
    debugPrint("HEIGHT: \(view.bounds.height)") // <-- here I should get a positive value
}

Actual behavior

On Xcode 26 I get zero for view height, while on Xcode 16.4 I get a valid non zero value

.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { view in
    debugPrint("HEIGHT: \(view.bounds.height)") // <-- here I got 0 on Xcode 26 and a positive value on Xcode 16.4
}

Steps to reproduce

Attach this code to a SwiftUI view and run it with Xcode 26 by choosing any iOS simulator, it will return zero for the view height.

.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) { view in
    debugPrint("HEIGHT: \(view.bounds.height)")
}

Re-run the same code with Xcode 16.4 by choosing any iOS simulator, it will return a positive non zero value for the view height

Version information

26.0.0

Destination operating system

Any

Xcode version information

26.0.0+

Swift Compiler version information

swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions