Build app for ios (react-native) - javascript

I used command: 'react-native run-ios' and I have a message "Build Succeeded", but when I can find app to install on my iphone?

There are two different things here.
Running react-native run-ios will run your application on your simulator.
To run it in your device, you'll need to run the application from xCode. You can check RN's official docs on running on device here.

Related

how to run cloned/github remote react native app, err msg no android

NOTES: Im new in react native and i see there are so many approaches and with this error i thought the developer who built this app build it differently from what i learn so i don't understand why he didn't put the android folder
so i just joined a project and im going to run the apps in my pc by cloning it from github but when i try to npx react-native run-android it failed to run and the log is like this
error Android project not found. Are you sure this is a React Native project?
If your Android files are located in a non-standard location (e.g. not inside 'android' folder),
consider setting project.android.sourceDir option to point to a new location.
info Run CLI with --verbose flag for more details.
the folder structure is like this
The files show that the project is created with Expo. Specifically, you have a managed expo project.
npx react-native run-android would compile an android app from source, with Expo's managed workflow that's not needed. You will need the Expo Go App.
Expo also comes with its own commands to start the bundler. Instead of running npx react-native ... make use of the expo-cli running: npx expo start
However, in the package.json there is very likely a script called start. In that case, it's easier for you to run npm start.
After running this command the expo console opens. Here you can press a to open the app using expo go (or instructions on how to do so).
Alternatively, you can run npx expo run:android to start the expo go app on android yourself.
you are using an expo, there is a folder named .expo-shared, after
npm install
Try to run
npm start
or
expo start
or
npx expo start
something like this will appear:
https://imgur.com/U9I7Gf4
after that go to the terminal, open the emulator in you computer and click on the terminal and press 'a',

Cannot run this React Native example in web browser

Code example I am trying to run: https://github.com/nshaposhnik/react-native-maps-example
I am on windows 10.
What I do:
Downloaded the code
Extracted to folder
Setup with the following after deleting yarn.lock:
yarn add react-native-maps
yarn add react-native-maps-directions
yarn add react-native-google-places-autocomplete
npm install
npm audit fix
Edit the code in the 3 places that requires my custom google API key which I got from the developer site
Tried running via:
npm start
I get a successful run in the terminal (" Welcome to React Native! Learn once, write anywhere"), but no browser opens up. I go to localhost:8081 in my browser and see a barren webpage with the following text:
React Native packager is running.
Visit documentation
That's all. Nothing in the sample project runs. I just want to run their app in a browser or emulator, though I don't have any of the phone emulators working, so I just want to run in web browser.
How can I make this work from the above example? Much appreciated.
You have to run emulator separately on "Windows" using android studio or command line, and after open your project using VsCode(or your editor) and the run following command ,
react-native run-android
Your app will run on your opened emulator

APK and Expo Client android app are different

I am building a cross-platform app with expo SDK36. I am testing with the expo client on android and ios.
It seems that the built expo apk downloaded on expo is different than the android version tested from my android expo client.
I can't scroll on my views with the app APK, hopefully, I saw it.
Is this an expo bug and is this expected? I was expecting to have the same app on both expo and real app.
I must rebuild until I find the bug, the APK and expo pipelines are quite busy, how can I troubleshoot efficiently without ejecting?
it is running cache. run this command. It will clear the cache.
npm start --cache-clear
Maybe your expo project on the cloud didn't update. Try
expo publish

React Native run on multiple simultaneous Android emulators

I would like to test my app on at least 2 Android emulators simultaneously. I can start 2 emulators but can't seem to find how to react-native run-android my app on 2 emulators with ADB. If possible I would also like to be able to run a react-native log-android on each one while testing my app.
Is there a way to do so ?
You can only do it on different ports. Because one port, one listener :/
Solve:
react-native start --port 9988
./emulator -port 9988 -avd devicename1
react-native start --port 9999
./emulator -port 9999 -avd devicename2
Edit2:
Before running the emulator, You can write in the terminal and then run it:
function emulator { cd "$(dirname "$(which emulator)")" && ./emulator "$#"; }
First emulator is react .
emulator -port 9988 #react
react-native run-android ( automaticaly detect emulator )
Second emulator is r .
emulator -port 8081 #r
react-native run-android (automaticaly detect emulator )
In order to run your react application on multiple emulators, just start 2 emulators as usual and then use the command react-native run-android.
You can even specify any port number as react-native run-android --port 8084 if you want. Your app will start on both the emulators simultaneously. :)
Have a look here
The accepted answer by #Burhan Yılmaz did NOT work for me. This is probably due to new updates and development in the relevant software. The following steps demonstrate what worked for me.
Start the 1st emulator, e.g.
emulator -avd Nexus_S_API_28
Start the 2nd emulator, e.g.
emulator -avd Nexus_S_API_28_2
Start React-Native in the same way, which you would usually use (without specifying any ports.)
react-native run-android
This sends a copy of the code to both devices. However, each device runs its copy in isolation from the other device.
Environment Details:
MS Windows 10
Android SDK 29.0.2
React-Native: 0.61.2
Using Genymotion, you just have to start 2 instances and start them as if there was only one (react-native run-android to install the app and react-native start)

platform-tools\adb.exe: Comman d failed with exit code 3221226356

When I run (Ionic run android )ionic project, it build success but there was an issue in deploying to device.
this is the error in my cmd
Follow below steps
Create virtual device from android adb manager.
Open virtual device(emulator).
Open termainal and check your emulator is connected or
not. $ adb devices.
If your emulator is connected then open
terminal and go to your root folder of project.
run followingcommand
$ ionic run android
I hope its work for you

Categories

Resources