Running react-native run-ios is success. but not launch simulator - ios

I've been using ReactNative in Windows. Android is perfect and now it has to build on the iPhone and give ipa to clients.
However, even if you run counter-native run-ios after updating the code yesterday, the app will not be launched on the simulator.
I started a new project because I thought there might be a problem with my project, and then I ran a counter-native run-ios, but I failed.
The terminal is output as a successful build, but there is no response to the simulator.
App is not installed.
Somebody please help me.
react-native version is 0.59.9
Images are run on terminals and simulators.

As in latest react-native version 0.60.0 + they have fixed too many problems which are with integration of latest xCode version.
Please do the following to achieve
Upgrade react-native version to 0.60.0 or +
rm -rf node_modules/&& yarn install && react-native link
cd ios and then pod install
Close the bundle and run(Cmd+ r) from xCode

Well, in my case I was in sudo mode. When I turned it back to normal mode, it showed up on the IOS simulator as an app.

Related

flutter app runs on Android simulator but not iOS simulator

I am running a flutter app on the Android simulator successfully but when I run it on the iOS simulator the app opens to a white screen then crashes.
I have done all of the following about 10 times each.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license
flutter update
flutter clean
xcode clean build folder
flutter build ios
flutter run
Remove the Pods folder and Podfile.lock files.
cd ios
pod deintegrate
cd ..
flutter clean
flutter build ios
Xcode 12.5.1
I also made sure Xcode Signing & Capabilities were set. I also stopped and removed all antivirus software.
It doesn't work by running debug and running via terminal ( flutter run --enable-software-rendering ) doesn't show any errors.
UPDATE:
Deleted the iOS folder and tried to run flutter create and now getting.
"No option specified for the output directory"
flutter create doesn't work.
Got the above flutter create working and now the app won't install on the Android device at all, where as it was working before flutter create was run (suggested below). Added memory and wiped Android simulator and still won't install on Android saying not enough memory. Deleting the ios folder and running "flutter create" was a disaster.
Rolling back to original code. Still stuck on not installing on iOS. It has to be something with Xcode.

How can i reinstall the react-native app in the simulator after deleting it?

I've just uninstalled my app in the simulator, and now I can't run it again using the react-native run-ios command. My simulator is open, but my app doesn't appear.
How can I reinstall my app to the simulator?
After I close my previous Metro terminal, and run react-native run-ios command again, I am able to get it re-installed.
Close the metro bundle and then run react-native run-ios command.
If it still doesn't work, open Xcode and run the project on simulator.
As i mentioned earlier in my comment, go to ios folder of the project, and open the .xcworkspace file or open the ios folder directly from xcode, and run the project on the simulator, this way it definitely will install your app.

App is not installed using react native command

I have react native cli application and when I tried to run it on simulator using npx react-native run-ios command it builds app successfully, bundler gets started and it shows 100% complete of bundler process but on simulator app is not being installed.
Note: simulator opens automatically but app not installed. When I use Xcode to run app it is working fine
Can you please help me with this.
Video
Thanks
Finally I get it working by clearing all cash using DevCleaner(From app store) also deleted all core simulators and added few again. I specified name of simulator as well with command as npx react-native run-ios --simulator="iPhone 11"

How to fix expo start throwing "Simulator is installed but is identified as 'com.apple.CoreSimulator.SimulatorTrampoline'; dont know what that is"

I am trying to set up a react-native development environment. I would like to set up an iOS emulator (preferably an iPhone 10) to run my app on. I am using a Macbook Pro 2016 running on MacOS 10.14.3. I have installed my react-native app through the command create-react-native-app (running version 2.0.2). I also have installed XCode running version 10.2(10E125). When I scan the QR code that Expo generates and run it on my iPad or my Android device it works just fine, but when I try to load the iOS emulator by pressing i after expo start it returns the error
Trying to open the project in iOS simulator...
Simulator is installed but is identified as 'com.apple.CoreSimulator.SimulatorTrampoline'; don't know what that is.
Simulator not installed. Please visit https://developer.apple.com/xcode/download/ to download Xcode and the iOS simulator. If you already have the latest version of Xcode installed, you may have to run the command `sudo xcode-select -s /Applications/Xcode.app`
I have already tried running the command sudo xcode-select -s /Applications/Xcode.app
I have also tried running the command xcode-select -r
I have also confirmed that in my XCode->Preferences->Locations Command Line Tools is selected as "Xcode 10.2(10E125)"
None of these have worked.
I am expecting that after pressing i after expo start an iOS emulator loads up. Thank you.
-----EDIT-------
After some more research, I found out that running open -a Simulator and then running expo start loads the app on an emulator and works for my purposes. But still if I just run expo start without running open -a Simulator it still gives the same error. I want to ask if this is the best I am going to get?
You might be running an outdated version of Expo. I had this problem when I was download someone's old repo using Expo 27 when Expo 36 came out. After updating to the latest version, it works.
To update packages in your project, npm-check-updates comes in handy.
npm i -g npm-check-updates # installs ncu globally
ncu -u # updates all dependency versions in your local package.json
npm install # updates the packages in node_modules to match
Note: This will update all your dependencies to the latest version. If you don't want to do this, you can find the latest version of expo and change the version in package.json manually.
I ran into the exact same problem all of a sudden. Clicking "Run on iOS Simulator" within the Expo Developer Browser worked 2 days ago but did not work today. Your clue of using open -a Simulator helped me though. I went into Xcode and clicked the Xcode menu > Open Developer Tool > Simulator. This started the Simulator and then I was able to click "Run on iOS Simulator" within the Expo Developer Browser and it worked as expected. If you haven't had the fortune of "Run on iOS Simulator" working, I'm guessing you could just start a simulator, download Expo from the App Store and just use it from there. None of this answers the question as to why the error happens but at least gives a few workarounds for anyone else that might need. All that matters is you get the app running on the Simulator in the end!

React Native : Sample App crashes after upgrading to Mac 10.12.6

I recently updated my Mac to OS.12.6 Sierra.
Previously working React Native (nothing fancy just their AwesomeProject sample app) stopped working.
When I run react-native run-ios I am able to launch the simulator the app just appears, and then crashes back to the iphone app screen without any error messages.
I have uninstalled and reinstalled react-native-cli, upgraded brew, watchman and reinstalled node modules..but no luck
Anyone has any pointers on this ?
I was having the same issues too after upgrading to Sierra 10.12.6.
I resolved by running create-react-native-app <folder>
And then I ejected it with yarn run eject
yarn run ios after, and the app seems stable.
I found out the rootcause of the issue.
Looks like this is a bug with the latest version.
Facebook has acknowledged this as a bug.
The workaround is to create the project with an older version like 0.44
https://github.com/facebook/react-native/issues/15770

Resources