cannot create iOS folder on my react native app - react-native

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..

Related

is expo the windows version of CocoaPods?

Okay so what brings this up is the different installation procedures you have to do when installing dependencies in react native. Where I am confused most is making sure the installation is successful and all the file modification/linking went well.
I constantly see some dependencies telling me to do things in xcode while others require something of expo or a npx install. I guess this is a little late to be asking considering I have already installed so many things into my project but if I am using expo on a windows machine, can I ignore anything that I see using npx? I understand modifications requirede in expo need to be done but for an example like this
Is the npm install command enough? To run on IOS that is.
I‘m not sure I understood the question but I think what you are asking is if expo install replaces all npx install commands.
In that case, yes and no. Expo manages a lot in the installation process of dependencies, even some that require some native code. But just not all of them. Not all native modules can be installed by Expo (Even though there‘s a ton of them already)
But if you somehow need to install a native module, that is not yet covered by Expo, you can look into EAS, which allows native installations in an expo project.
Here‘s a link to their documentation: https://docs.expo.dev/build/introduction/

'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary

This is my Code which is showing this error . Here I am trying to make a Drawer-navigation
This is the error showing , I am doing this in react-native.
It seems you might have missed some installation / setup steps for react-navigation.
Please check this section in the docs: https://reactnavigation.org/docs/getting-started#installing-dependencies-into-a-bare-react-native-project
If you have already installed the packages listed there (notably react-native-reanimated), perhaps you have not installed the native dependencies. This is important on iOS - run npx pod-install in your project root, and then build the app again (hot reload will not be enough).

is it necessary to rebuild react-native project after linking

I would like to know if it's necessary to rebuild react native project after installing and linking libraries that includes native codes.
Yes, as react-native-link updates some native files that are under the ios/android folder, that won't be checked during a reload/hot-reload/live-reload. All those files aren't checked in your jsBundle and are compiled during a run-android or run-ios.
Of course, if you added a new dependecy to the project and linked it, and you haven't used it anywhere in your code yet, you don't need it. If you are using that dependecy, your project instance will, most likely, die.
if your react native version is below 0.60 then you have to run react-native-link after you install any react-native module. However after react-native version 0.60 and above, this is done automatically using the new "autolinking" feature added.
Read the changelog here:
https://facebook.github.io/react-native/blog/2019/07/03/version-60
However you still need to rebuild your project after you install a native module but you dont need to run the react-native-link command anymore after installing every library after react-native#0.60 and above. Just type react-native run-android

React Native not installing properly

I am familiar with React Native. I got a new macbook and I am trying to create a new file. However, when I run create-react-native-app [name of app] I am greeted with:
This command requires Expo CLI.
Do you want to install it globally [Y/n]?
When I pressed Y it created the file, however, in a complete file layout. It looked so odd and there were some files missing too.
Normally, when I run create-react-native-app it created the file without asking anything about expo. I am pretty confused. I'm pretty sure I have done wrong somewhere. Where and how I can get the traditional installation process back?
I also know that expo helps with testing. Since may I have been using npm start and npm run ios to test my apps on device and xcode simulation.
https://facebook.github.io/react-native/docs/getting-started I followed this.
New version out now and create react native app has been merged with expo CLI.
To avoid any bug use new version to create react apps, follow the command bellow which is also in the link given in your question.
expo init AwesomeProject
After installation you will be guided to start project with expo start.
cd AwesomeProject
expo start

React-native Xcode build fails -> 'RCTAssert.h file not found'

I did exactly the steps which are described here in the React-native getting started guide:
https://facebook.github.io/react-native/docs/getting-started.html
When I open the Project and build it, the build fails:
RCTAssert.h file not found' in MyProjectNameTests.m .
What am I missing?
Here are the steps from the getting started guide:
Requirements
OS X - This repo only contains the iOS (7+) implementation right now,
and Xcode only runs on Mac.
Xcode 6.3 or higher is recommended.
Homebrew is the recommended way to install io.js, watchman, and flow.
Install io.js 1.0 or newer. io.js is the modern version of Node.
Install nvm with its setup instructions here. Then run nvm install
iojs-v2 && nvm alias default iojs-v2, which installs the latest
compatible version of io.js and sets up your terminal so that typing
node runs io.js. With nvm you can install multiple versions of Node
and io.js and easily switch between them.
New to npm?
brew install watchman. We recommend installing watchman, otherwise
you might hit a node file watching bug.
brew install flow. If you want to use flow. We recommend
periodically running brew update && brew upgrade to keep your
programs up-to-date.
Quick Start
npm install -g react-native-cli
react-native init AwesomeProject
In the newly created folder AwesomeProject/
Open AwesomeProject. xcodeproj and hit run in Xcode. Open index.ios.js
in your text editor of choice and edit some lines. Hit cmd+R in your
iOS simulator to reload the app and see your change!
The test application can't find the header because it's not in the header search path.
In the left hand file list, hit the top left "folder" icon, then select your application at top left. In this case "AwesomeProject".
To the right of that, where the application icon appears, hold down to change to AwesomeProjectTests.
On the right side, click on the 'Build settings' tab.
Then scroll down to Header Search Paths and change "$(SRCROOT)/node_modules/react-native/React" to "$(SRCROOT)/../node_modules/react-native/React".
The app should now compile.
I got the same issue as daniel but I already have the right path in xcode ...
0.10.0 is my version
It's an issue in 0.10.0, and it has been fixed just now.
You need to re-generate your project. Refer to this PR: https://github.com/facebook/react-native/pull/2474
seeing same issue here and it seems react-native is latest on 0.10.0, i was using 0.8.0 and was running fine. May be to disable the test target for now?
Before testing any option from the above mentioned solutions, just clean your xCode and build the app again. That helped me
I had the same issue (I just had changed my apple ID password). I needed to redo the code signing configuration.
This happened to me on a React Native project.
I rolled back my code to a version that I knew built successfully and still got this error. How is this even possible? There's two hours of my life I'll never get back. I write this here on the chance I save you from the same fate.
In my case when I jump from my IDE in which I code my react-native project over to Xcode I open it from Spotlight.
At this point it is so easy to click the wrong icon on the right hand side. I accidentally clicked on the Xcodeproj file instead of the Xcworkspace. Easy to do, once it loads everything looks exactly the same, I was none the wiser.
The only indication that something had gone wrong was the build errors. Worse this error looks like a dependency management issue sending you down completely the wrong path in a resolution attempt.
This is not just a React Native specific issue, but something all Cocoapod users need to remember.
ADD the React Path to Podfile
platform :ios, '9.0'
target 'YourProject' do
...
pod 'React', :path => '../node_modules/react-native'
end
target 'RNFirebaseTests' do
...
pod 'React', :path => '../node_modules/react-native'
end