I created an app using redux-persist. The problem with persist is if I install my app in a new device then for all the future installs my loggedin info is saved. I tried uninstalling the app & also logout before uninstalling but whenever I install again, my old user loggedin data fetched from persist.
Check my persist configuration below
Related
How to alter or delete specific application data using Asyncstorage when uninstall or update app
App locally saved data might be backed up on Google Drive on the latest versions of Android. You can disable it either by setting <android:allowBackup="false"> (true is the default behavior) or by disabling auto backup in your phone's settings.
When you uninstall your app by default Asyncstorage data will be deleted.
For update thing, you can store and check current app version at very starting
of application and if mismatches then do whatever you need.
I am setting up code-push for my app and found a weird behaviour. I compiled the app for staging and installed it on the android phone and then pushed some updates through code-push which were downloaded fine.
I am not changing the versions of my apk in android/app/build.gradle since i am installing directly from the mac to the phone for testing in staging mode and it overrides the previous installation.
I keep track of the bundle-id for bugsnag and the last bundle-id for code-push is 1.6.5. After some more modifications I ended up creating a new apk for staging that was installed and now the bundle-id is 1.6.7. I haven't pushed this to code-push yet. As soon as the app runs it asks for an update and if I update i get the old bundle (bundle-id 1.6.5) from code-push. Not able to understand why i will get old code as an update. Am i not setting some parameter correctly?
react-native: 0.44.1
react-native-code-push: 2.1.1-beta
You have to push the package to code push and make it available for 1.6.7 version so that it downloads the new package instead of the old one.
You can make the release mandatory and tell code push to download it and update it on next resume like so
codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_RESUME, installMode: codePush.InstallMode.ON_NEXT_RESUME })
Currently I have an iOS and Android app with a DB powered by Realm.
Right now I set use Realm importing a file named Realm.js which exports a Realm database with a schema loaded up.
Soon I will release an update to edit some fields in the Realm DB but if users update the app since the iOS and Android will download and install a new version, does the Realm schema version get reset?
In other words if a user updates an iOS or Android app with Realm will the old Realm database get persisted on the device and the new migrations from the update run?
Also is it possible to completely reset a Realm database? By that I mean destroying the old one and loading the first version of the schema, edited without having to write new migrations.
If your realm files are written to the Documents directory (the default) then when an update is downloaded, the updated app with access the existing Realm files and the schema version will still be at the last set version.
If you would like to avoid migrations all together you can delete all realm and related files and directories before opening your new realm.
I'm a newbie in Mac OSx & Objective-C development.
I'd like to ask some help on how to terminate as well as replacing an existing app (with an earlier version) when a later version of the app is being installed or upgraded?
I am aware about updating an app when a new version is available in the App Store or an external server. I've got that covered already. But this one is an implementation for a mac with no internet connection. Upgrading is done manually by installing the app whenever there's a new version available.
Behavior when installing:
It should check if there's an existing copy of the app in the system. It should prompt the user to continue and remove the app or cancel the installation.
If an existing copy of the app is currently running, it should prompt the user to quit the running copy of the app or cancel the installation. When the user selects to quit the app, it should automatically terminate the app and continue with the installation. The app with the previous version should be replaced by the newly installed copy of the app with the later version.
Any help would be much appreciated.
The PackageMaker can do all of this for you. Prepare an installer using this app by Apple. If you are using Mountain Lion then download it from
https://developer.apple.com/downloads "Auxiliary tools for Xcode"
Launch the application and click the edit button in the actions tab below preinstall actions.
In the sheet that is presented add the Quit application action.
My application use the keychain to store users and passwords. When I remove and reinstall my app, the keychain is not clean, keys are always in the application.
How to detect the removing of my app and use my cleanKeyChain method ?
There is no observer to get notified if the app gets deinstalled. If the app is not running at that time its useless anyway. You can use bundle props (fresh = true on 1st run) and remove / add things again with a reinstall.