I'm a bit confused by react-native-git-upgrade process flow, It seems to work fine, but it only updates packages in package.json, never native files in android or ios. These files are changed in my project i.e. changed app bundle id's, icons, launch screens etc... I am wondering if this is why it never updates them?
Also, what in release notes can indicate that something changed in native files, so we can use it as confirmation maybe?
if you check the documentation it says is automatic.
IMPORTANT: You don't have to install the new version of the
react-native package, it will be installed automatically.
Blockquote
But in case of any doubt you can always delete the ios and android folder, and do the following:
react-native eject
This command is gonna create the ios and android projects.
You should follow the documentation:
But if the above doesn't work to update, then is a different problem and I suggest to create an issue.
Related
I have just created a regular create-react-app application, with the aim of sketching out components for a future project. But I ran into the problem that in order to see at least some, even small, changes purely in the text of the rendering component, you need to completely reboot the server using npm start.
And so with everything. I can even delete all the files from the root folder where I installed create-react-app, and the site on 127.0.0.1:3000 will still work (I tried). What should I do to enable hot-reloading?
I'm wanting to create a React library that I can build locally and that deploys into the NPM global area. I want to be able to use my other React project that also sits on my machine and picks up changes as I modify the library. I have found plenty of tutorials that either deploy to NPM (which I don't want) or that I have no idea how to get it updating automatically to my project. I tried one with rollup.js that seemed to work for a while but then stopped for some reason.
Ideally looking for tutorial or source code that I can look at.
Do's: build locally, automatically update changes to my project
Don'ts: deploy to NPM or another external repository, cause problems when setup on another machine
Want: One library, one project, easy update to the project when the library is changed, be able to create an entry in the global install with the library version
Thanks
Paul
I'm struggling with making changes and possible a pull request for a third party react native package with cocoapods and auto linking.
In this case I want to add some minor functionality to React Native Camera. And I've forked the repo.
While developing I'd like to use my local code, but I can't get it to work.
I'ven tried using npm link, but this doesn't work since React Native can't find the linked package with the TypeScript import statement.
I've also tried just to edit Objective C code directly in node_modules, running pod install again and rerunning react-native run-ios, but it doesn't seem to include my changes.
I've never really made pull requests to other packages before, so I think I need some help. I thought this would be the easiest thing to google, but it turns out it's not.
You may be doing this already, but make sure that you clean and rebuild the project from xcode if you're modifying objective C code in the node modules folder, before re running react-native run-ios.
If you've already installed the library you also shouldn't need to rerun pod install.
Similarly on android, be sure to rebuild the project in android studio.
Okay So I'm extremely confused on how this all works...
I want to run my app on my device and not through Expo.
So I'm reading the Facebook documentation and told me to open up my ios directory and open up the xcode file. While I proceeded to look inside my directory of course I don't find my ios folder...lol (Don't understand why they don't tell us the step to actual create the folder..)
So I'm google and googling and find that I needed to eject. But in that documentation it told me it was permanent... Doesn't sound safe at all.... So I did it anyway and it created my ios folder.
I opened it up on xCode and deploy it to my phone.. Why is that the app looks completely different from the one it ran on expo locally...
If you look at the picture below, they're two different app..lol. Like come on what sort of trickery do I need to go through just to have my app run on my device without going through expo.
Why is it showing 2 different apps?
Future wise, Should I only eject when the app is completely done? Since I can't run it on expo anymore.. hence the permanent changes.. How would I test native device features? This honestly makes no sense.
How to start working on react-native ios without expo.
brew install node
npm install -g react-native-cli
react-native init AwesomeProject
open ios/AwsomeProject.xcodeproj in xcode
You can also install cocoa pod and use AwsomeProject.xcworkspace.
In account add ur ID Apple Id and download certificate manually
In general menu add your apple id and press run
For next time open terminal
cd project
react-native run-ios --device "iPhone"
Note: Write your device instead of iPhone. Hope I made things clear for beginners please feel free to correct me if i am wrong.
I want to use my UI components as a reusable seperate repo/project for my react-native iniit App.
So i creatd a seperate project folder like this
and installed these dependencies
and few dependencies externally with my other app.
Then i used
yarn link
to link this project to my working app as a module just like a node module. but i get this error when i try to run my app?
Is there an issue with my method, or is there a sure way i can try to reach my goal because i found multiple ways and various configuration of creating such component libraries.but i didn't use any since the end goal is different.
This is a known issue with the React Native packager. See this discussion: https://github.com/facebook/react-native/issues/637.
This may have to do with using watchman, although there seem to be a few different cases where this can crop up.
TL;DR: React Native packager does not respect symlinks to projects, so npm and yarn link do not work like you would expect them to. Apparently this is being resolved in metro-bundler: https://github.com/facebook/metro-bundler/issues/1.
Unfortunately the workarounds are not that pretty, but there are a few options discussed in the issue 637 discussion. It also looks like you may be using a github repo for your package.
You could tell npm to get your library from github via your project's package.json, so you probably do not need npm link, though you will not be able to link to your local files for your module this way.