react-native: Screen mirroring (airplay) is broken

Description

The IOS screen mirroring feature is broken when a native alert is displayed. The alert will only appear on the mirroring screen and not on the Iphone, preventing any interaction with it.

Occurs on IOS

The minimal reproduction uses expo managed, but ejecting won’t solve the issue.

React Native Version

0.71.7

Output of npx react-native info

OS: macOS 13.3.1 CPU: (8) arm64 Apple M1 Pro Memory: 102.20 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.2/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm Watchman: 2023.02.13.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild Languages: Java: 18.0.1.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.8 => 0.71.8 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  • Start the project on your phone
  • Start mirroring on a compatible screen like your Macbook screen
  • On your phone, press the alert button.

-> The alert will only be shown on the mirroring screen but not on the phone

Snack, code example, screenshot, or link to a repository

https://github.com/Chayuan/expo-screen-mirroring-issue

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Edit : We were able to resolve the issue with airplay by reverting this commit.

Edit 2 : Upgrading to react-native 0.71.10 does not fix the issue.

Could you provide a repro for this using React Native vanilla, and with this template? I saw that the provided repro above is using Expo, and that’s not good for me.

Updated this repo using the mentioned template and find the reproduction steps here.

Thanks! I hope to find some time this or next week to look into that. 👍

Hi @cipolleschi, thanks for the answer.

Here is the minimal reproduction using the cli, I can confirm the issue is still there.