React Native CLI : Run IOS in windows PC - android

I just want to know, Is there any way to run or test the IOS app in the windows emulator, I just want to test if my app can run in the IOS too using emulator etc., yet in my Android using npx react-native run-android it works fine and now I just want to test the command which is npx react-native run-ios but I think it only works at IOS instead windows, Is there any chance to run it in the emulator of android studio? or should I used VMWare?
I have already app using React Native -CLI and I want to test and run it on the IOS

A Mac is required to build projects with native code for iOS. You can follow the Expo CLI Quickstart to learn how to build your app using Expo instead.
React-Native Getting Started

Related

React Native set up With Android Studio and Google Pixel As ADB

I am using the React Native tutorial on the website to learn android development and also the ReactNative CLI. I'm using Android Studio as my preferred editor. When I try to run the default app generated by runinning npx react-native init AwesomeProject and npx react-native run-android, it says error Failed to launch emulator. Reason: Cannot Launch Google Pixel As ADB. I'm not sure what to do even though my emulator is working perfectly

can't run react native project in simulator from command

I am new in RN, and frankly in any modern front-end tools. So, I am working on an existing project, where I just run
npx react-native start
to run the project from the terminal, when the packager has started, I run
npx react-native run-ios
on another terminal window, which pretty reluctantly starts the ios simulator and opens the app as well. but the problem occurs when I run
npx react-native run-android
on the same windows, it gives throws an error as given in the screenshot:
To solve the problem, I always open my Android Studio, and build and run the app, which runs the app in the android simulator.
But I would really appreciate if there are some JavaScript or RN geeks who can help me run the app in android by the command
npx react-native run-android
I run a mac, use VS Code, I have yarn, npm installed.
Just try to remove the virtual device from avd manager in android studio and recreate it again. I also faced this issue recently and this is how i solved it. Also, check for any available update in android studio build tools.

How to run cli created cordova project, in visual studio?

I have created a cordova project using command line and running everything using VS code. But, the problem is now I want to push my app to playstore and that I cannot do with VS Code. So for that I want to run my project in Visual Studio 2017. Is there anyway to run the CLI generated cordova app in visual studio.
Here are a couple links related to running a Cordova App in VS. Seems like you'll have to plug in an android device, run an android emulator, or run it in a browser:
https://learn.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/run-your-app/run-app-android?view=toolsforcordova-2017#google-android-emulator

No folders android and ios

Why after create-react-native-app I don't have a folder android and ios?
Now I can't open this by react-native run-android and can't put for example android permissions.
What is wrong?
There are two ways to create React native project.
create-react-native-app AwesomeProject => This used expo to create app and when you use this command to create app you will not find android and ios folder you cant add platform specific libraries.
react-native-init => this app is not created using expo you can find android and ios folder and can do native coding or use platform specific libraries as well as permission you mention.
In your case want to add permissions:
If you wish to do native coding (android and ios) or want to install Platform specific libraries i.e. npm link you need to run npm run eject command
(Note: Once you run eject command you can't run your app using expo. So before doing this go through docs)
you should run react-native init projectName.pay attention you should run cmd as run as administrator
Naviagte to project path and execute the following command to get android and ios folder
1. > npm i //To get all dependencies loaded
2. > react-native upgrade //To get android and ios folder
3. > react-native link //To link the dependencies to ios and android
4. > react-native run-android or react-native run-ios

How do I use Storybook in React Native with my main project?

I have a React Native project setup using react-native init and am using Storybook to develop my components in isolation. I ran the getstorybook command inside this project and the CLI generated a storybook directory with all the necessary files, as described in the Storybook docs.
When I run npm run storybook command followed by react-native run-android, I'm able to view the stories on my emulator. Now if I need to run my main app (not storybook, but the one which was generated by the react-native init command), I have to run npm run start followed by react-native run-android.
Is there a way to not have to build the app every time I switch from Storybook to my main app? Am I missing something obvious here?
Thanks in advance!

Categories

Resources