Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Latest commit

 

History

History
43 lines (31 loc) · 1.45 KB

debug-two-ios-apps-simultaneously.mo.md

File metadata and controls

43 lines (31 loc) · 1.45 KB

[MO] Debug two iOS apps simultaneously

Last update date: 29th of January 2018

Prerequisites

Steps

  • For the first application, you can launch it as you would normally:

    • Open it with xcode xcode ./ios/your-first-app.xcworkspace
    • Open React Native Debugger
    • Launch the simulator from xcode with the play button on the top left

{% hint style='success' %} CHECK In RN debugger, you can see logs from the first app. {% endhint %}

  • For the second application:

    • Open it with xcode xcode ./ios/your-second-app.xcworkspace
    • Modify the port used by the packager in the native code:
      • Do a full project search with "Maj + Cmd + F"
      • Look for "8081"
      • Replace "8081" by a new port, like "9980"
      • Save each change
    • In React Native Debugger:
      • Open a new window "Cmd + T"
      • Enter your new port "9980"
    • Launch the simulator from xcode with the play button
    • Launch a new packager from your project directory: react-native start --port 9980
    • Close and re-open the app from within the simulator

{% hint style='success' %} CHECK In the other RN debugger, you can see logs from the second app. {% endhint %}

  • You are good to go! Both apps are now running with separate packagers and separate debuggers.