How to build react-native app for iOS properly? - javascript

I developed a react native app (version 57.4) on windows for android and it works fine.
Now I'm trying to build for iOS with no luck (as I don't have any experience with Xcode).
What I tried so far:
I knew that it requires a Mac and Xcode so I downloaded a VM, install Xcode.
Git clone myApp
react-native run-ios
But I got a lot of errors and build failures so after some search, I make these more steps:
react-native link
link some fonts manually
add a pod file and pod install
make some Xcode changes which I can't remember
react-native run-ios
And it works :)
BUT I had an issue with axios so I tried to fix it but I ruined the app so I removed the folder and re-cloned it again.
This time, I can't build successfully again!! and if it builds it crashes instantly!
My Question is what the exact steps do I need to make to build successfully on Mac (especially steps for Xcode)? including how to link all native dependencies correctly? and Is the pod file is necessary?

Related

'React/RCTBridgeDelegate.h' file not found in xcode

I have made a react native app for android but i need to run that app on mac so what are the files to transfer. I have transfer ios folder on mac but its not running. Its showing the error 'React/RCTBridgeDelegate.h' file not found
my Reactnative code is
But how can i run it on mac using xcode.
Here are steps that worked for me today:
Removed the following inside ios directory:
Podfile.lock
Pods
Re-installed the pod files:
pod install
I still had the same issue, then I have run the app using Xcode instead of
running from the terminal.
If none of the above fixes it, you might also try removing node_modules and run npm install or yarn install and do the same steps above again.
If anyone else has had this problem and none of the solutions worked, make sure you opened "projectName".xcworkspace and not "projectName".xcodeproj with XCode.

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',

Issue with the ios folder, after expo ejecting

I'm trying to integrate paypal payments into my expo app, but as expo not yet supports paypal i was trying the react-native-paypal package. This requires to add some extra dependencies into the ios/android folders so i was trying to eject from expo using expo eject. Note that im running this command from a windows operating system and i also did find a way to install cocoapods. But the thing is that after running expo eject it warns me that i should do this procedure from macOS or linux to get the ios folder. How else can i get this? Thanks in advance.

React Native Windows App Loading Error (80072f78)

I'm new to react and react-native, and am attempting to run the react-native-windows template project but have encountered an issue.
Error
App loads in a blank window with error banner Error 80072f78 downloading http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true
Image for reference
What I've Tried
I followed the instructions on the react-native-windows getting started docs
Namely:
npx react-native init <projectName> --template react-native#^0.63.2
cd projectName
npx react-native-windows-init --overwrite
npx react-native run-windows
The process will start another terminal window with the react logo. The application will build successfully, and will start in a new window. However, the original error is always present.
I've tried uninstalling and reinstalling all relevant programs. I've also tried building in both c# and c++, to no avail (adding the --language flag in the third step above).
Versions
react-native-windows: 0.63
react-native: 0.63.2
Windows SDK: 10.0.18362.0
node: 14.16.0
npm: 6.14.11
I couldn't find any issues like this online. If anyone has a suggestion, I would appreciate it. I'm more than happy to provide further info. Thanks!

Do we need to run pod install with Expo project

I'm new with app developing. I'm using react-native 0.63.2 and i've created my project with Expo.
There are no ios and android folders
So, should we have to have these folders to run pod install and correctly link the React Native app to the futur iOS app or this is not necessary anymore?
Because with the command npx create-react-native-app to create a project, they do exist.
Thanks.
You don't need to install Pod. Just run expo start or expo build:ios
No you don't need pod install here.. you can build your application without using xcode or android studio... expo handles it all :)

Categories

Resources