renative icon indicating copy to clipboard operation
renative copied to clipboard

fix(tvOS): Replace ios-deploy with xcrun commands in @react-native-community/cli-platfom-ios

Open RicardasN opened this issue 4 months ago • 8 comments

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 - https://github.com/ios-control/ios-deploy/issues/588, however, unlike before https://github.com/ios-control/ios-deploy/issues/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

  • https://github.com/flexn-io/renative/issues/1706

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?

RicardasN avatar Oct 17 '24 16:10 RicardasN