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

Latest commit

 

History

History
24 lines (19 loc) · 1.05 KB

debug-javascript-ios-device.mo.md

File metadata and controls

24 lines (19 loc) · 1.05 KB

[MO] Debug Javascript on an iOS Device

Prerequisites

Steps

⚠️ The Ip mentioned is the one from your local network and not your router's ip on the internet

⚠️ Make sure you have reverted the changes after debugging to avoid build issues

  • Make sure both the device and computer are on the same network
  • Open your project in Xcode
  • In Libraries/React.xcodeproj/React/Base/RCTBundleURLPRovider.m
    • Replace NSString *host = ipGuess ?: @"localhost";
    • With your computer IP address (remove ipGuess if it poses problems): NSString *host = @"<your_computer_ip>";
  • In Libraries/RCTWebSocket.xcodeproj/RCTWebSocketExecutor.m
    • Replace: host = @"localhost";
    • With your computer IP address: host = @"<your_computer_ip>";
  • Verify signing by making sure you have obtained the signing certificate for debug first
  • Run the app
  • Shake to open the menu
  • Hit Debug Remotely