React Native iOS and Android folders are not present

I am new to reacting to my native language, and I had problems understanding the folder structure of the application, which should be supposed to be present in the project folder when I created it. Basically, when I create a project with npm, I get several startup files (App.js, etc.) and a node_modules folder. I got it and worked with expo, which also created the .expo folder.

However, when I go to the official documentation or look at plugins / add-ons on git, they talk about the android and iOS folder in the root of the project several times. But they are nowhere to be seen. Then I got some tips that I could install and run response-native-upgrade- git, which would presumably generate these missing folders. But that didn't work either.

So what did I miss? Where are these folders located?

Edit: here is a screen dump from a Youtube tutorial showing the structure of the project I'm looking for:

enter image description here

+30
source share
7 answers

One of the Expo points on top of React Native is that you are not switching to Android or IOS code. Expo deals with these folders for you, you do not need to interact with them. Is there a reason you need these folders? if so, you will have to extract. Here is the documentation for this: Extract with ExpoKit

+24
source

You can go to this project structure by doing:

npm run eject

Expo, Android/iOS.

+16

, ReactNative, : React Native.

ReactNative , :

react-native init YourProjectName
cd YourProjectName
react-native run-ios //for iOS

, ReactNative. ..

+13

Android iOS

react-native eject

react-native link
+7

, , , - .

ios , , expo. , android ios.

app.json

    ios: {
       bundleIdentifier: "com.yourcompany.yourappname",
    },
    android: {
       package: "com.yourcompany.yourappname",
    }

exp detach

android ios

+2
react-native upgrade

, npm install

0

at the beginning of the installation, respond to the native one, after running expo init YourProject, select the minimum (Typescript) . after that go to YourProject directory and do not start npm start. but run npm, run android . hope this helps

0
source

All Articles