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

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.

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)

How to do Remote Updates On Flutter

I have a flutter chat app. Companies like Whatsapp & Facebook update their app without forcing users to uninstall or manually uploading the APK again to google play. Is this possible with futter i tried using firebase remote config but it didn't work as i expected ( Changing UI on the go ). Any answer will be appreciated.
WhatsApp and Facebook use React Native with CodePush (if I'm not wrong).
You can't update an app without forcing a user somehow to update the app from a store with Flutter as it compiles to binary and React Native – not
There are multiple things you can do and it is based on what you want to achieve. [From your question your goal is not clear.]
Change Something based on configuration.
If you have configurations defined then you can use Firebase remote config to pass on value to devices and devices should behave according to value that you have set on Firebase Remote config.
Limitation of this approach:
In this approach, don't expect your newly updated code will into existing app. Above approach works, if code is already there in the compiled binary and you just want to switch path.
Binary version update:
If you want to force new app version download then it would require a different approach,
Android: Yes it is possible.
iOS: In-App update is not possible. You can show prompt to user by saying that new version is available and redirect user to new version on Store.
If user has enabled auto-download in iPhone settings then there are chances that app version updated to new version when user come to app.
For implementation look at here: Binary version update
Flutter now has unofficial support for code push using Chimera Flutter Code Push.
Here is a full tutorial

How to update flutter app programmatically in Play/App store?

There is an upgrader (mostly for iOS) and in_app_update plugin (for android). I try to implement them both and had a difficulty to do so. I post and issues in both plugin but I got no response. So if anyone use this 2 plugin successfully please can you share step-by-step approach details.
Basically How to update flutter app programmatically in Google Play Store (Android) & App Store (iOS)?
Thanks
I have also tried in_app_update 1.1.11 and upgrader 2.4.0.
For upgrader:
I also don't know how to use Appcast, so I use the iTune api to get my app version in the App Store then pop up the install dialog. However, the iTune api is so slow to update. Therefore I just use Firebase remote config to set the version once the app is published.
For in_app_update:
I also don't know how to use it. I have add the Play Core in app/build.gradle
implementation 'com.google.android.play:core:1.8.0'
Nothing pop up even I downloaded the old version from the Play Store and then publish a new version.
Update:
I found that in_app_update actually work just by following its example code. I don't have any update pop up before because my Android device is Mi 9, seems there is some bug in it. The update pop up can be seen in the release version of other brand of devices
Since I really want to use the Play Store in-app-update, so for android I did use the remote config... waiting for someone to have the guides

Is there a way to force users to update my ionic app

Just like the title of the post. I would like to know if there's a way to force users to update my ionic app if there's a newer version. Or at least any idea how to notify them that there's a new version of the app. My ionic cli version is 2
Using the App Version Plugin, you're able to request the users' version of your application. Once retreived, you able to decide for yourself what to do when a version (mis)matched. For example you could open the device's application store using the Market Plugin.
You can have your own design for an Ionic application.
You can track the current version of your application and store the latest application in DB.
Next step is to compare your current version of the app with the DB and decide what action need to be taken for an APP.
Other solution, you can directly use Force Update of Firebase which is a ready solution for any application.

Detect which version of an app is installed in iOS?

I understand it's possible to Detecting programmatically whether an app is installed on iPhone . I'm wondering if it's possible to detect what version of the other app is installed?
My app has a dependency on the Facebook native client, but behaves pretty badly if the phone has an older version of the Facebook app installed. So I'd like to be able to detect that and warn users.
-- UPDATE --
It's being implied in the comments that I can prevent users from installing my app in the first place if the appropriate version of the dependent app is not present. That would be a great solution too. If you know how I can specify a dependency on another app's version number, please explain that.
Unfortunately, you can not read your iOS device settings programmatically to get the native app Facebook version (i.e. via Settings, Facebook, Version).
Nevertheless, you might try to experiment with the custom URL schemes for Facebook as you noted in your own question.
It seems the different versions of the native Facebook application either support/does not support its own custom URL schemes.
As noted here from version 3.4, you can:
fb://places
From version 4.0, as noted here, you can:
fb://place/(fbid)
etc.