Skip to content

Incorrect element locations on iOS 18.1 Simulator #2138

Open

Description

@BrandonYuen

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

  1. Spin up a 18.1 iPhone 16 Pro Simulator
  2. maestro studio

Actual results

tapOn doesn't work so I investigated with maestro studio and as you can see below, the element locations (boxes) are incorrect.
Screenshot 2024-11-12 at 16 41 36
Screenshot 2024-11-12 at 16 41 46

Expected results

Locations (boxes) of elements should be correct.
As a fix I downloaded and installed a iOS 16.4 Simulator which does not have this issue. It's the same exact code and context, just swapped the simulator.

About app

Closed source

About environment

Macbook m4, iOS simulator 18.1

Logs

No response

Maestro version

1.39.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

Activity

  1. linear commented on Nov 13, 2024

    @linear
  2. vinaykumar0339 commented on Nov 27, 2024

    @vinaykumar0339

    @BrandonYuen, we also encountered this issue, and it doesn't seem to be tied to the OS version. We experienced it even on iOS 16 while working with a React Native application. Interestingly, the correct coordinates are returned when using simulators like the iPhone SE with a fingerprint touch (HOME button).

    It would be helpful if the Maestro team could investigate this to ensure compatibility across all simulator types.

    After debugging the Maestro iOS driver, I found that the issue stems from the following code, which returns incorrect element coordinates:
    https://github.com/mobile-dev-inc/maestro/blob/5cbe0495fcf646481ac4e214ce116a417dc83622/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/Handlers/ViewHierarchyHandler.swift#L182

  3. vinaykumar0339 commented on Nov 29, 2024

    @vinaykumar0339

    @herval can anyone look into this issue, please? it is good if this layout works in all type of devices.

  4. vinaykumar0339 commented on Dec 3, 2024

    @vinaykumar0339

    @herval Could you provide some insight on whether this will be supported in the future or if there are no plans for it? Also, is this issue specific to XCUITest, or is there a workaround to make it work?

  5. JB-CHAUVIN commented on Jan 15, 2025

    @JB-CHAUVIN

    Same issue goes for me...

  6. iqbalmineraltown commented on Feb 25, 2025

    @iqbalmineraltown

    I also having this issue on maestro 1.39.13 with simulator iPhone 15 Pro Max iOS 18.1

    simulator iPhone 15 Pro Max iOS 17.5 works fine

  7. added theissue type on Apr 1, 2025
  8. vinaykumar0339 commented on Apr 2, 2025

    @vinaykumar0339

    @iqbalmineraltown Could you confirm how your launch screen is configured?

    Is it using a storyboard approach?

    Or is the launch image set via the assets catalog in the build settings?

    In my case, I noticed it wasn't working correctly on some devices. After debugging, I found that my app was using option 2, and switching to option 1 resolved the coordination issue. Please confirm how you're handling it on your end.

  9. iqbalmineraltown commented on Apr 3, 2025

    @iqbalmineraltown

    @vinaykumar0339 nice finding
    yes I'm using Storyboard for the launch screen

    Currently, this issue is only a slight hindrance to my UI testing. Moreover, only happened on a specific iOS patch version
    for now, I won't bother putting effort into changing anything in my code

  10. JosephLovato commented on Jul 7, 2025

    @JosephLovato

    Upvoting this, especially now that App Store Connect requires Xcode 16 using an SDK for iOS 18

    Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions