I was checking latest react native blog in which they introduced doctor command for react native.
the only thing i can understand from there is do envoirnment stuff for you. ?
But i don't understand the purpose.
What is exactly purpose of doctor command in react native ?
The doctor command is available as a part of React Native 0.62.This command to help you out with getting started, troubleshooting and automatically fixing errors with your development environment. The doctor command is heavily inspired by Expo and Homebrew's own doctor command with a pinch of UI inspired by Jest.
Command
npx #react-native-community/cli doctor
This command checks your environment and displays a report of the status of react native installation. Check the output carefully for other software you might need to install. For example:-
What checks are currently supported
doctor currently supports the following checks:
Node.js (>= 8.3)
yarn (>= 1.10)
npm (>= 4)
Watchman (>= 4), used for watching changes in the filesystem when in
development mode.
Specific to the Android environment:
Android SDK (>= 26), the software runtime for Android.
Android NDK (>= 19), the native development toolkit for Android.
ANDROID_HOME, environment variable required by the Android SDK setup.
And to the iOS environment
Xcode (>= 10), IDE for developing, building and shipping iOS
applications.
CocoaPods, library dependency management tool for iOS applications.
ios-deploy (optional), library used internally by the CLI to install
applications on a physical iOS device.
Please check following link for more detail
https://facebook.github.io/react-native/blog/2019/11/18/react-native-doctor
It is similar to flutter doctor. React native doctor command will fix any issue related to react-native in your project or pc. For example if you have not installed android studio, its packages or xcode necessary for running project, it will either suggest or automatically fix issues which will save hours of headache.
Related
Warning in Google Play:
This release is not compliant with the Google Play 64-bit requirement
The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 1.
From August 1, 2019 all releases must be compliant with the Google Play 64-bit requirement.
Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app.
How to fix this problem?
What I have already tried is to add ndk.abiFilters in gradle
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
when I created apk, app started crashing immediately.
You have to upgrade your react native. For expo follow react native docs. For react native without expo You can use these commands:
sudo npm install -g react-native-git-upgrade
Then
react-native-git-upgrade
I am deploying an app built with React Native and Expo to Play Store and the following error appears:
This release is not compliant with the Play 64-bit requirement.
The following APKs or App Bundles are available to 64-bit devices, but they have only 32-bit native code: 1. From 1 de agosto de 2019 all releases must be compliant with the Play 64-bit requirement.Include 64-bit native code in addition to 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives just the native code it needs.
My Expo version is 27.0.1
Regarding this post https://github.com/facebook/react-native/issues/2814 react-native v0.59 is 64bit compliant (https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059)
and Expo 27 support react-native v0.55.
I'm not an expert with Expo, but can you manually upgrade react-native to v0.59 ? or maybe wait a new version of Expo ?
On July 16th 2019 they stated in 64-Bit Support and Android App Bundles:
We want to let you know that you can now build 64-bit support-enabled .apks that also make use of Android App Bundles (AABs) with SDK33 projects and, of course, with SDK34 upon its release. (Since SDK33 is the first Expo SDK version that uses React Native 0.59, the React Native version that allows for 64-bit support, prior versions of the SDK can’t be updated.)
These updates help us support your new submissions to the Google Play store, which will need to have 64-bit support starting August 1st. Your existing apps won’t need to upgrade to include 64-bit until you need to submit your next app update (though SDK33 has a lot of other fun things you might enjoy!).
Ensure you are running the latest version of expo-cli by running yarn global add expo-cli or npm install -g expo-cli.
Currently, there is no way to fix this. But the Expo Team promised ...
... to add this feature [64-bit binaries] before the deadline.
see here: https://forums.expo.io/t/does-expo-package-64-bit-version/18947
Is it possible to build app in React Native using Windows instead of linux ?
I am a really beginner. On the official website ReatNative we can read:
Assuming that you have Node installed, you can use npm to install the
create-react-native-app command line utility:
npm install -g create-react-native-app Then run the following commands
to create a new React Native project called "AwesomeProject":
create-react-native-app AwesomeProject
cd AwesomeProject npm start
But how to do that on windows ?
There is no information about that
Take a look at this page - Getting Started
Please note that you have to select Building Projects with Native Code Tab. Then you can select Windows and Android
On Windows you can only develop react native app for Android. Then if you want to build apps for iOS you need a IDE called Xcode. And Xcode is only available on mac OS. Other way to build apps for iOS is creating a mac OS virtual machine that runs on Windows. your pc / laptop must have enough computing power to run it. I think 8GB RAM, and SSD and a Intel i5 7x series would be enough.
For installing Node.js and other tools you need for your development on Windows you have to use the command prompt. That is what you was asking for. I hope it helps you. Let me know if you have success.
Take a look here
How to use the Windows command line
Getting Started with React Native Development on Windows
We developed a React Native application with Expo Kit SDK. Now, We would change the native full Firebase SDK, but before we have to uninstall Expo SDK (Expo doesn't support external native sdk services). Is there a best practice to do that as easy as possible?
Hey I believe for Expo it's called detaching, like CRNA is ejecting...
https://docs.expo.io/versions/latest/expokit/detach
1. Install exp
If you don't have it, run npm install -g exp to get our command line library.
If you haven't used exp or XDE before, the first thing you'll need to do is log in with your Expo account using exp login.
2. Make sure you have the necessary keys in app.json
Detaching requires the same keys as building a standalone app. Follow these instructions before continuing to the next step.
3. Detach
From your project directory, run exp detach. This will download the required dependencies and build native projects under the ios and android directories.
4. Set up and Run your native project
Congrats, you now have a native project with ExpoKit! Follow the directions under Developing with ExpoKit to get things set up and running.
5. Make native changes
You can do whatever you want in the Xcode and Android Studio projects.
To add third-party native modules for React Native, non-Expo-specific instructions such as react-native link should be supported. Read more details about changing native dependencies in your ExpoKit project.
I am asking this question for the third time and I don't get it why no one even tries to help on this, is this question not well explained? If you can ask for more information I can give!
I am having trouble created iOS folder inside my react native app(detached) as when I created the app I created it from windows machine and iOS folder didn't come when I wrote: exp detach
Now that I have got a macOS, how can I get to create iOS folder so I can use that to build from xCode. I tried react-native upgrade, this is telling me that I have some version conflicts, so I don't want to upgrade it actually, I just want to have iOS folder on my react native.
What would be the best solution in here?
Interestingly I tried exp detach over my detached app and it created iOS, it's working! hopefully this will help anyone!
Please follow the below steps:
Step I: Ensure below installable are installed
Java Sdk Android Studio
Xcode (in case of OSX)
HomeBrew (in case of OSX to install node)
Node/NPM (Node runs Javascript outside the browser. NPM is used for installing and managing Dependencies. Node and NPM come
together)
Those are some essential installs that you will need in your Project
**Step II: **
For windows/OSX you need to run the following commands in your command prompt/command line:
This is the important part for running a react native project:
**Step II: **
npm install -g react-native-cli
Then you can use this cli to start a new project like this:
**Step III: **
react-native init
Hope this helped you, please vote..