React-Native iOS hot reloading and debug mode not working in real device

Viewed 1839

Background:

I am working on a react-native app for a while and it was working fine till now. Currently facing some issues in the iOS on the same version that has been completely tested and verified before.

Issue:

Currently live reloading, hot reloading and even debug mode doesn't seem to work for my app. The app runs only for the first time, it wouldn't work if I try to relaunch the app from Xcode.

It stops at the splash screen always so I have to completely delete the app from the device and redeploy it from Xcode. I don't know what is causing this issue. It seems working fine on other laptops so I doubt the problem is with my Xcode.

This issue is not project-related as I have created a new app to test it out and experiencing the same outcome. Could anyone help me with this?

Please read the things I have already tried before answering with some common things. Thank you in advance.

Few things I have tried:

  • Cleaned the project.
  • Cleaned the Xcode Derived Data
  • Deleted the watchman cache.
  • Updated Xcode, iPhone, and watchman to the latest version
  • Pods re-installed.

Reason for Issue:

Version mismatch for iOS device and Xcode. iOS version: 14.6 and Xcode version 12.5 as Xcode 12.6 is not released yet is there any workaround?

1 Answers

Delete main.jsbundle in ios folder.

Generate new main.jsbundle

react-native bundle --reset-cache --entry-file ./index.js --platform ios --dev false --assets-dest ./ios --bundle-output ./ios/main.jsbundle

Related