Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with iOS USB device enumeration app #2207

Merged
merged 7 commits into from
Nov 5, 2021

Conversation

citizenmatt
Copy link
Member

This PR fixes some issues with the helper app that's invoked when the Attach to Unity Process dialog starts. This app loads a native library provided by Unity and polls for Apple devices attached via USB. If the iOS Build Support module isn't installed, the helper app isn't invoked.

  • Stop throwing exceptions on a background thread. Fixes RIDER-69809. Some versions of macOS will silently ignore this, others will show a "dotnet has unexpectedly quit" dialog
  • Update paths to native library for Unity 2021.2. The files have moved into x64 and arm64 directories. The app will now try to load the library from the new location and fallback to the location from previous versions
  • Load the correct native library when running on M1 Macs. If Rider is running under Rosetta, the helper app will load the x64 library. If running natively on M1, it will load arm64. If running natively on M1 and there is no native install of Unity, it will gracefully not load the library and USB debugging will be unavailable. The troubleshooting guide linked from the dialog has been updated to include this scenario. (Loading the wrong library is what caused the exception shown in RIDER-69809)
  • Support USB debugging on Linux, loading the native library that's available on Linux (and correctly handling the path change for Unity 2021.2)

Note that the change in location for Unity 2021.2 means that older versions of Rider will be unable to load the library with newer versions of Unity, and USB debugging will not be available. Depending on OS, there might also be a crash dialog shown.

@citizenmatt citizenmatt added this to the Rider 2021.3 milestone Nov 5, 2021
@citizenmatt citizenmatt self-assigned this Nov 5, 2021
@citizenmatt citizenmatt merged commit 9d367d4 into net213 Nov 5, 2021
@citizenmatt citizenmatt deleted the net213-mte-ios-usb-m1 branch November 5, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants