-
Notifications
You must be signed in to change notification settings - Fork 906
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
Not possible to specify macCatalyst UDID as run target #2313
Comments
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
This is still a problem, I still carry this patch |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
I still have to carry this patch around Here's the version for rn 0.77 release candidate series https://github.com/mikehardy/rnfbdemo/blob/rn77/patches/%40react-native-community%2Bcli-platform-apple%2B15.0.1.patch |
Environment
yarn react-native info
from inside a project (note:npx react-native info
does not work from outside a project)Description
As requested in a comment on a PR I posted here for the CLI - this issue is about the difficulty of specifying macCatalyst as a run target
I have a script that does fully scripted / reproducible build testing for react-native-firebase + react-native, and I want to test the macCatalyst target since we support it.
As far as I know there is a
run-ios
command in the CLI but there is norun-catalyst
(which makes sense, as it is really a sub-flavor of iOS)So as far as I know the only way to specify that I want it to be a macCatalyst build is to either specify the device name (Preferred method!) or to specify the UDID of the machine.
Here's the problem: On Apple Silicon machines at least, xsimctl does not return the correct UDID for the available macCatalyst hostname!
This leads to two downstream problems in the CLI:
What is the solution? Determine why xsimctl isn't returning the right UDID I suppose but that's upstream, not in our control.
What I do in this patch is simply accept - with a warning - that if a developer has gone to the trouble to specify a UDID - that the UDID must be valid to try even though it doesn't show up in the device list from xsimctl and just have the CLI build to it anyway.
A little bit ugly but I also set it to catalyst build type at the same time - this part specifically is not great
It works.
And I get the UDID by on purpose requesting a build that will not work from
xcodebuild
so it gives me the list of UDIDs that will work and I parse out the catalyst UDIDThat part is definitely awful but it does work. Why isn't xsimctl working ?
Reproducible Demo
Run this with a valid XCODE_DEVELOPMENT_TEAM set https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh
It should try to build for catalyst. Modify as needed. Remove the patch hunk to see it fail
The text was updated successfully, but these errors were encountered: