I am working on react native expo project and I have no knowledge regarding how to create iOS and android folders within expo project.so please help me regarding how to create iOS and android folders and at last how to make final build. thanks.
https://docs.expo.io/versions/latest/expokit/eject/#3-eject
From your project directory, run expo eject. This will download the
required dependencies and build native projects under the ios and
android directories.
Related
I think I saw in a documentation somewhere that they had merged android and ios folder into one and it's now all in index.js file but maybe I dreamed it because I can't find it. I'm trying to setup flipper on my RN project and it's on v62.2 & expo v37 but they are no android or ios folder which is why I am so confused. My project is fully running both on ios and android.
How could I setup flipper if these folders are gone?
Didn't expo or RN merge the android & ios folder into the index.js?
If they are merged then how can I setup flipper?
Edit: So are they any alternative to flipper for layout debugging?
Flipper requires you to update for iOS: the podfile and the AppDelegate, for Android: the build.gradle and the MainApplication.
This is manipulating native code. Expo does not allow you to manipulate native code as it is abstracted away from you. To see what the differences between Expo and a "pure" react-native project I suggest reading the answers to this SO question as it should clear up some of your misconceptions.
As Flipper has just been released it is unlikely that these native modifications will be in the current Expo SDK. The Expo 37 SDK uses React Native 0.61 internally which means as this is a feature of react-native 0.62.0 it will not be available in 0.61.0.
To get Flipper working in a current Expo project you would either have to eject and then follow the instructions on the Flipper website for setting it up, or wait for Flipper to be added to the Expo SDK (which could be expedited by adding a feature request.
I have a question and I didn't find a clear answer.
It's possible to build android and iOS app in local ?
We can build the application with expo build:android and expo build:ios but these commands need an account and send the source code in server of expo.
I see it's possible to eject the app and folder android and iOS are created but after that I keep the possibility to develop with expo ? If I modify a javascript code I can recreate again the android and iOS folder ? or I need to develop in native code ?
Thank you for your answers !
As far as I understand your question, If you eject the app, you can't develop with expo. But, you can keep editing in javascript. There is no necessity to develop in native code.
While creating an app in react native, I didn't get sub directories like android,or IOS. I Used create-react-native-app command.
New version of CRNA integrates Expo Toolkit, and android and ios folders are hidden. If you want to separate these folders, you must detach expo from react native app.
npm run reject
You can read more detail at CRNA's github
I found that create-react-native-app is based on expo. but when using exp-cli, it is also based on Expo.
what are differences between create-react-native-app and exp init ?
Updated answer:
create-react-native-app was replaced by expo-cli.
https://docs.expo.io/workflow/glossary-of-terms/#create-react-native-app
Answer to this question is well documented in expo documentation
Expo & "Create React Native App"
Create React Native App lets you build a React Native app without any
build configuration. This may sound familiar to you because Expo does
this as well -- when you create a project with XDE or exp you don't
have to deal with Xcode or Android Studio configuration files, it just
works. This guide is intended to outline some of the key differences
between Expo and CRNA (create-react-native-app).
CRNA does not require you to have an Expo account
You can run create-react-native-app YourAppName and off you go. So what does not
having an account mean, and what would signing up and using XDE/exp
get you -- why do we require it with Expo? Having an Expo account
allows you to do the following:
Publish your project to a permanent URL, eg:https://expo.io/#community/reactconf2017.See Publishing on Expo for more information.
Build binaries for app / play store distribution. To do this with CRNA without using Expo,
you would need to run eject.
There are advantages and disadvantages to either:
React Native app advantage:
You can add native modules written in Java/Objective-C
React Native app disadvantage:
Needs Android Studio and XCode to run the projects
Expo advantages:
Setting up a project is easy and can be done in minutes
Expo can build .apk and .ipa files
You do not need simulator to run your app.
Expo disadvantages:
You can't add native modules.
Your final app will bigger with expo init than with react native app init.
I suggest you read this:
https://docs.expo.io/versions/latest/introduction/why-not-expo
I'm trying to use create-react-native-app as per the documentation with an example project that was built using instructions for react-native.
In terms of translating from one to the other what are the steps involved?
Edit: So i can run the app using npm start, with the expo.io QR code appearing as an option etc?
Create-react-native-app create a new project with Expo, you can eject it to turn it into a react-native project (android/ios folders with native code + src folder with javascript code).
You'll need an Xcode/Android Studio environment to run a react-native app built without Expo.
You can't use Expo to run a React-Native app with custom native code.
Related links : Ejecting from Create React Native App
What is the difference between Expo and React Native?