Search code examples
xcodereact-nativeapp-storeapp-store-connecttestflight

React Native: How can I create a binary and run it directly on iPhone?


I have a bug in my React Native app that occurs on TestFlight builds but not when I run it from my computer. Is there a way to create a binary like the one that I'd push to the App Store, and then run it directly on my device so that I don't have to push it to TestFlight every time?


Solution

  • You can create a "Release" build of your React Native app and run it on your phone by changing the scheme of the "Run" action.

    First, click on your target in the Xcode header (left side of the attached image).

    enter image description here

    Scroll down and choose "Edit scheme"

    Next, choose the "Run" scheme.

    enter image description here

    Then, change "Build configuration" to "Release".

    Connect your phone, choose the phone as a build target and Run from Xcode. The version that will be run will be the same as the version that gets created when you archive and send to TestFlight.

    enter image description here