Search code examples
iosxcodereact-nativemetro-bundler

React Native - .app file on Xcode Simulator asking for Bundle URL


I want to generate .app or .ipa file for my react native application , so that i can use it for the Automation testing on simulator using Appium. This is the command am using for building the app file for simulator (using Fastlane)

lane :buildForAutomation  do |options|

xcodebuild(scheme: "CavionNovus",
           xcargs: "-configuration 'Debug' -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator' "
           )

end

This will generate a .app file . i have installed the same on the simulator using the below command

xcrun simctl install booted ./CavionNovus.app

It will install the app successfully , while launching it will wait for few seconds and show error message on the screen.

enter image description here

Its asking for metro bundle packager . So my Doubts are

Do we need a packager like metro bundler to run the .app file in simulator ? If so how can i add it during the build process ?


Solution

  • When using xcodebuild(scheme: "CavionNovus", xcargs: "-configuration 'Debug' -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator'") you're building an ipa in debug mode. To be able to run your app without Metro Bundler, you will have to change the configuration to release.