I'm trying to run a React Native application on iOS device. It works fine on simulator, but while running on device it takes long 20-25 minutes to run. I get stuck on Running 1 of 1 custom shell script.
I tried deleting npm, clearing watchman, resetting npm cache, updated React version, Watchman version, etc., but nothing worked. I even tried to deploy to device using commands even that is taking lot of time.
Attaching screenshot for reference.
To run a react native app on an iOS device, you must run via the Xcode development environment on your selected iOS device connected to your development machine via USB. react native can deploy and run on a connected Android device via the command line. This works well.
Open the command prompt and type ipconfig to find your machine's IP address ( more info ). Make sure your laptop and your phone are on the same Wi-Fi network. Open your React Native app on your device. You'll see a red screen with an error.
Go to Dev Settings → Debug server host & port for device. Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081). Go back to the Developer menu and select Reload JS.
Have you tried deleting everything inside the DerivedData folder then cleaning and building again?
Folder located at ~/Library/Developer/XCode/DerivedData
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With