We’ll create a brand new React Native app, and get it to launch on the iOS simulator and Android emulator. A Mac is required to build for iOS, but Android development can be done on Mac, Windows, or Linux.
Instructor: [00:00] After installing the React Native CLI and Xcode if you're running iOS or the Android dependencies if you want to run Android, create a new React Native project by running react-native init and the name of your project.
[00:15] We'll make an app to review restaurants. Let's name the app restaurantReview. Note that the app name must be alphanumeric only and can't contain spaces. You can also change this name later before you distribute the app.
[00:30] Once the app is created, CD into the new app directory. Then run the app in the iOS simulator with react-native run-ios. The simulator will start automatically, and the app will build and launch. This can take quite a while the first time you run the app, but it will be faster after the first time.
[01:10] React Native picks the default iOS simulator, but you can switch that in two different ways. First, you could specify a simulator to the React Native run-ios command by setting the --simulator flag.
[01:24] Alternatively, you can open the project folder in Finder, navigate to the iOS directory, and there you'll find the underlying Xcode project for the app. You can open that Xcode project, select the simulator you want to use, and then click the play button to run the app.
[01:43] To run the app on Android, first, open the Android emulator of your choice. Then, with the emulator open and unlocked, run react-native run-android. React Native will automatically detect the open emulator and will build and launch the app.
After installing the React Native CLI and Xcode if you're running iOS or the Android dependencies if you want to run Android (what do you mean by that ? I'm running on my ubuntu, so no ios or Android .. ), ... is this step covered somewhere ?
Ina: Go here: https://facebook.github.io/react-native/docs/getting-started
And then select "React Native CLI Quickstart", and then select "Linux", and "Android".
That should walk you through the steps to install the Android dependencies on Ubuntu, so that you can build for Android
After running command: react-native run-ios there is error message in simulator: "No bundle URL present". Solution is to run: yarn start in project root
After running the command
react-native run-ios, I got the following error:
Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65
Can you please help me fix this?
My react-native version is 2.0.1 & xcode version is 9.4.1
Also, when I opened
RestaurantReview.xcworkspace in Xcode and hit
Run button. I got the following error:
Property 'passwordRules' not found on object of type 'UIView<RCTBackedTextInputViewProtocol> *'
Hm - it seems like it could be caused by several different things... there's many options here: https://github.com/facebook/react-native/issues/25240
(for the error 65) Do any of those help?
nothing worked from that thread so far.. trying -
reinstall cocoapods > pod install > run-ios 🤞🤞
After this, only option left to be tried would be restarting the system. I've little hope from that, since 8081 port is already free on my system.
no success.. still same error :(