-
-
Notifications
You must be signed in to change notification settings - Fork 181
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(tvOS): Replace ios-deploy with xcrun commands in @react-native-community/cli-platfom-ios #1759
Conversation
…mmunity/cli-platfom-ios
when I try to run on ios device, I get this error -> Xcode version 15.2 |
It seems to say device not found, could you check if it's displayed in Xcode amongst selection of devices before running? Asking only because e2e seems to have worked. |
Which XCode are you running? I see mentions on Apple forums on similar issues fixed in xcode 15.1 - https://forums.developer.apple.com/forums/thread/737286 In another thread I see
Sorry for pinging you about this constantly, but I don't have an iOS device to test |
Xcode version 15.2
There is no rnv app on ios device. |
this is the error I am getting while installing on ipad, xcode 15.2 |
Hmm, very interesting, it seems to have a problem with launching the app, because the output is very weird of that second info. Could you check what you get if you run the first command:
Because it seems the output of that is a weird string, that might be different for iOS compared to tvOS |
|
|
I've tested on iOS device -> both via xCode (v16.0) and via CLI app successfully installed and launched. |
ios works, tvos both cable and wireless installs but isn't launched when there is no app before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove at least the throw part, which is the only important, should not matter for tvos
On ios everything works as expected, on tvos when installing wirelessly both when app is preinstalled and not, everything works fine. However on cable in the case when app is preinstalled, it isn't launched |
Description
Removed the previous solution for this from runner.tsx and replaced it with an override of the @react-native-community/cli-platform-ios plugin.
The key issue is - ios-control/ios-deploy#588, however, unlike before ios-control/ios-deploy#588 Apple no longer features versioned device support directories https://developer.apple.com/forums/thread/730947, hence the failure with launching the apps on tvOS.
Why override the plugin instead of building the app inside the runner and install it via xcrun? Fast refresh. I noticed, that if I do so, it no longer works, which would hamper development, therefore the better solution in this case is to have slightly worse maintainability, but fast refresh working.
Related issues
Testing
I tested 2 scenarios - tvOS install and launch via cable and via network, both cases seem to work fine, but this needs to be tested wth iOS devices (I have none available to me) to make sure it did not affect them in any negative way.
Extra to discuss
This change would mean, that anyone running latest renative (using 12.3.6 of @react-native-community/cli) needs to have Xcode 15 or newer installed, otherwise there will be issues installing the app too on tvOS, not just launching it, where should that be documented?