Is ionic storage preserved on ios when an updated version of an app is published - ionic-framework

I have seen some posts that mention problems with ionic storage when publishing app updates. I'm using the #ionic/storage module in an ionic 5 app for ios to store some user customized app data. My question is will the user's data be preserved after they receive the app update?
I looked through the documentation but i couldn't find any information on this topic. Has anyone successfully updated an ios app and saw that the data managed by ionic storage was preserved after the update?

Here info from documentation of #ionic/storage for Ionic 3 (https://ionicframework.com/docs/v3/storage/):
When running in a native app context, Storage will prioritize using
SQLite, as it's one of the most stable and widely used file-based
databases, and avoids some of the pitfalls of things like localstorage
and IndexedDB, such as the OS deciding to clear out such data in low
disk-space situations.
The newest docs (https://github.com/ionic-team/ionic-storage):
Out of the box, Ionic Storage will use IndexedDB and localstorage
where available. To use SQLite for native storage, see the SQLite
Installation instructions.
So, to keep your data safe you should add SQLite to your application.

Related

Changing published mobile application developing language from ionic to flutter

I have a mobile application developed using Ionic. Now I want to redevelop it in flutter and publish a new update, would that be possible? will google play and AppStore allow that?
There is no constraint on development language. But,
You need to use same certificates/keys for iOS App
You need to use same key-store/keys for Android App
If you are using local database or file storage, then you should follow the same path in your newly created app as well. If you are using any third-party library to manage the db or file paths, then it may be in different location altogether. (This one actually happened to me. When I migrated my app from a cross-platform framework to Native the database path got changed in release version)

Check if my ionic app has a new version on AppStore and PlayStore

I would like to add functionality to my Ionic based application to check the respective app store for a newer version, and if present, prompt the user to download once (not repeatedly- they should be able to skip and not be nagged). Similar to Siren, but for Ionic and both Google Play and Apple App Store. I see this similar request for native apps and AppStore and this similar request for Play Store, but nothing specific to Ionic. I feel like I could stitch it together using App Version and ajax calls listed from those requests, but that there has to be other people who have done this already and have existing Cordova/Capacitor plugins for this. Also that there may be nuance that a naive solution could fail (ie ajax call fails, app stores change API, newer version is not supported on device, etc).
Is there an existing plugin or code that will implement the behavior described above?
You can use Market plugin in addition to the App version plugin..
I haven't come across a solution which directly checks the app store, instead i have to maintain the app version in my server db and check it at app start.
Here is the flow that can be used..
App Launches
Checks the current app version using APP VERSION plugin
Calls an API endpoint to my server to compare for the deployed app store version (which is maintained in the db)
If the app version is outdated, use the MARKET plugin to take the user to the app store.
A Capacitor alternative to the market plugin is there, but didn't test it out.
Follow Capacitor plugins proposals, for an upcoming solution.

Difference between Ionic Storage and Native Storage?

I'm Actually using Ionic Storage. and I heard About The Ionic Native Storage
I Don't Know the Exact Difference Between Them. Which One Is Preferred to use?
They have basically the same purpose and both work with key/value to store items, but i think Ionic Storage is better and i'll tell why.
The Native Storage need and will only work with the plugin instaled, so if there's no plugin or if it's a webapp the user can't use the storage. It's intended to be used because iOS may remove stored data when running out of memory.
The Ionic Storage works in a diferent way, you can save your values in the IndexedDB, wich is a type of storage for the browser, but if you install te SQLite plugin it'll automatically priorize to save your data in SQLite so there's no loss when iOS is out of memory.
So when using with SQLite, if in a browser running as a webapp the user can still save data, because since there's no plugin in the web it'll use the IndexedDB, and if there's no IndexedDB then it'll use localStorage.
And you don't need to learn SQLite to save with the plugin, the Ionic Storage will do all the work for you, you just need to use the key/value as the same way you would use for the Native Script or the localStorage.
Which one is preferred? It's all up to you, but i see more advantages in Ionic Storage.
Check out the Ionic Storage Docs.
Hope this helps.
the principal difference is this:
Native Storage is a Cordova Plugin, so only work in devices. Its a little faster than Ionic Storage on devices, because uses the native functions of the device to store Key/Value data.
Ionic Storage is a not a Cordova Plugin, is a javascript library, and can be used both in Devices and Navigators.
There are no big difference between them, i prefeer Ionic Storage because i can realize faster tests on browser during development.
Nowadays I work with ionic 4 and I have experienced unpleasant latency of the #ionic/storage module, but after I switched to the native storage I got a better performance. and by the way you still can use it while testing with the browser using the ionic cordova run browser command not the ionic serve command.
So what I am trying to say that native plugins always win in the matter of performance.
Best Wishes

What is Intel xdk local storage size limit

I need to develop a mobile application that communicating with rest service. I think that using of intel xdk cross platform may be appopriate for that. I got some informations via internet investigation about the platform. Then i learnt that local db usage is possible by IndexedDb. But im confused with size limitation of persistent db file. So application may need to db file to use during offline bigger than 10mb. Is it a problem. By the way, offline db contains products with pictures. Im curious about that Is it possible to persist a field with only filepath referenced to mobile storage instead of byte of file? For example is it possible to save picture file which came from service to somewhere belonged to mobile's storage? Finally, can i deploy my program with initial db? Thx, brgds
There are many options for local storage for your app. It is important to understand that an XDK app is a Cordova app. The name XDK refers to the tool, not the runtime environment. Your XDK tool creates Cordova apps.
Try searching for something like "phonegap cordova local storage solutions" for a list of the options available to you when you create a Cordova app.
BTW -- PhoneGap apps are also Cordova apps. :)

iPhone and Webapp sync through iCloud ??

just checking if its possible to sync iOS devices AND a web app through iCloud. Currently we've got an iOS app built, are looking at using iCloud for synching between all the devices and also want a web app component. iCloud would be great to use as the module to sync everything together.
Anyone know if it's possible ?
I have a similar requirement and have wondered about this too.
Unfortunately iCloud data doesn't seem to be accessible to a Web app. And if you found a hack around it, it would still be an unreliable solution as Apple could always make changes down the road that break your Web component, intentionally or not.
Edit: With CloudKit this is no longer true. It comes with a Javascript API for the explicit purpose of providing a web version of your app.
Sorry if I'm misunderstanding the question, but I was looking to add iCloud support to my web app recently and came across the official iCloud JS API. The promo text reads:
Keep your apps connected and up to date across iOS, OS X, and now on the web with CloudKit JS.
[emphasis added]
https://developer.apple.com/icloud/
It is really hard to determine what you mean.... If you are asking if you can implement iCloud in a web app, then I believe that the answer is 'no', since there is only an API for Objective-C for iCloud.
However, you might be able to embed your JS code inside of a native wrapper and write some native code for working with iCloud. However, that may or may not be an option depending on your particular situation.
Edited for spelling.
You could possibly do this, but only if
You where running your own server
The server was running on the iOS platform
You where able to create software in Objective-C for that server
You could then potentially write a server application, that could be used to connect to the iCloud API, then return the calls back to the end user as Json messages that could be consumed, perhaps by some html interface.