In Xcode open Debug -> Attach to Process and choose your app process (it will likely be named as your app). In Android Studio open Attach debugger to Android process, check Show all processes and choose the device that your app is running on. Open the native subproject of your React Native app (probably placed in android or ios directory) in Android Studio or Xcode.Run your React Native app (on a device or an emulator/simulator).Here is the way how to debug the native code inside a React Native app. Sooner or later, you will probably need to dive deep into it. While developing a React Native app, most often you are focused on the JavaScript code, but you cannot forget that the native code is still there under the hood. env file in the Environment property as follows: ENVFILE=.env.staging. If you leave the Arguments property empty, it will attempt to install the app on any connected device. To manage simulated devices, open Xcode, go to Window -> Devices and Simulators. The simulator is shipped with Xcode and you need a Mac to run it. To install and run the app on a simulator set Arguments property to -simulator="iPhone X" (or any other device with iOS you want to test on).The name of your device you can find and edit in Settings -> General -> About -> Name. To install the app on a physical device set Arguments property to -device="MyDevice".We can use either a physical device or a simulator to run the app on. Go to Add Configuration (or Edit configuration, if you happen to have any configuration created already).Ĭall it Run iOS or whatever is meaningful to you. I personally use IntelliJ IDEA, but WebStorm is pretty similar. It is quite convenient to create build configurations in your IDE.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |