is it possible to replace existing react native app with a new one? - react-native

I have a react native project on 0. 59 version and I tried to do major updates to 0. 60. But it seems to be impossible I can not run the app on the emulator. So I had this idea of creating an empty project and to transfer my code on it. Has someone ever done something like this?
Is there a way to link existing app on the app store with a new

Yes, you can start a complete new app and replace it in the App Store with the new one.
The app is only identified by the bundle identifier (iOS) or the applicationId (android).
But I would recommend using upgrade helper before migrating to a new project.

Related

How to update the app dynamically whenerver any package or library is updated in flutter apps without updating the app

I wanted to know that when a package or library is updated in futter ,we have to manually update the version name in pubspec file. but I want to do this without even updating the app which on play store or app store. I just want to update the app dynamically.This can be done in react native and here also it may be done in flutter. Please let me know if you have any idea
Drop your comments down and let me know
Thank you
This can't be done in Flutter. React Native does it by hauling around the JS compiler. The Flutter compiler (and all the tree-shaken unreferenced classes and methods) are simply gone at release delivery time.
That's why the debug app is so much bigger than the release app. The debug app has your code, the compiler, the hot-loader, and does no tree-shaking to remove unused classes and methods.

After updating a react native app, trigger an action before app launch (clean persistent store in my case)

I modified some redux store (using redux-persist) logic in my app, and when a user update the app, at the first launch he get a crash because of inconsistency between the previous store and my new code. If the user relaunch the app everything is fine.
How can i detect that this is the first launch of an updated app version, clean the store and then render the app with new store initialization ?
I know how to clean the store, the part i struggle with is the way to know if the app just got updated and it's the very first launch. I don't want to clean at every launch.
Thanks in advance

React Native local Notification by background service of App

I want to show notification when new post available in react native app.
when ever my app open it fetch latest PostID{POSTID is auto increment in online database} and save the latest PostID in Mobile database.
But now if App close it should check in background by fetching after every 15min about new postID and compare it with the saved PostID.
If saved PostID is smaller then received PostID then it should show notification of new post.
you could use react-native-firebase, it encapsulate Local notifications feature since version 4+...
Problem: this version is only compatible with Gradle 3+, which React Native doesn't support yet (RN 0.56 still runs with gradle 2.3.3)
An alternative in the meantime is - react-native-fcm' - they're dropping development in favor of react native firebase, but has the feature you want.
You could even copy/paste the code you need if you don't want the whole 3rd party lib...

React Native :How to make changes in app without updating it again by the user?

Is it possible to make a change in the user side (UI as well as funstionality) without updating the app again by the user? If yes , then what kind of architecture should follow when starting a new project? Could you please help me to know how is it possible?
I think you can use CodePush through this you can push new changes directly to them as a user don't need to update the app.

codepush react native new package

I tried react native code push and it works flawlessly. Let's say I modify the text in my buttons to say something else, then with a single command, the update is sent to the users.
Now, lets say I am using a new npm library which requires some native code. Say react-native-image-picker (https://github.com/react-community/react-native-image-picker). Can code push handles this? I want the image picker functionality to be updated too in my users app. Thank you.
No - CodePush can only update JavaScript code and images.
CodePush does not update native code at all so any changes to native code require a full app build and deploy via the relevant app store or app distribution tool (e.g. HockeyApp).
Note: There are some limitations around images - full details here.