Flutter auto-update app when a new version is released - flutter

I wonder how to make my application (which is already published on play-store and app-store) updates automatically when a new version is released.
I have found some packages that support similar thing like: https://pub.dev/packages/new_version and https://pub.dev/packages/upgrader but the issue is that all these packages display a dialog when a new version is detected. But I am asking about making it completely automatic without any dialogs appearing.
I also knew about https://pub.dev/packages/firebase_remote_config but it doesn't answer my question about releasing new version.
I see this feature in a lot of apps but I don't know how it's made in flutter.

Unfortunately you can't auto-update.
Auto-update strategy depends on user settings
You can only ask user for update

It is not possible that the Application gets automatically downloaded and installed. Both ways are also not allowed from the AppStore and PlayStore Agreements.

Related

How can flutter app gets the new version update from the play store or the Apple Store automatically

How can we make the flutter app to make automatic update whenever we release a new version of the app into the store. but I don't want to use the pop up to alert the user to update I want to update automatically without letting the user even know we update it.
As said in the comment, if you publish to Google Playstore or iOs AppStore, they will handle the updates for you. You just have to upload the new version (just set the release number correctly) and, when the validation is done, their system will notify/update the app. I don't know how other stores behave, but I'm guessing that's the standard behaviour now.
Instead, if you need to bypass the store functionality and perform the update "by yourself", I don't think that is gonna be a simple task. Apple simply doesn't allow installation from other sources than their store, so I fear it may be simply impossible. On Android, on the other hand, I know that's possible, but it will require some user interaction beforehand, since the "installation from unknown source" authorization must be provided to the app that downloads/opens your .apk file, and the procedure may vary from a device to another, so I fear there won't be a single mechanism that will work everywhere.
In any case, the base mechanism will probably require some HTTP GET by your app towards some webserver that will reply with the latest version: the app should then compare the received version number with its own, and then proceed to the download of the package (the URL for the download can be provided along with the latest version number). After that, you have to manage somehow to install/update the downloaded file.
I personally used this approach with Flutter on Windows 7 and newer, where there are no store constraints and I can simply run and download the .msi or .exe file for the latest version, and works just fine.
I think you are looking for the concept of codepush which was loved by many React Native developers.
In Flutter, I think you might want to check out flutter_code_push if this fits your needs.

What is Apple's policy with regards to disabling old versions of an application?

My employer has a free iOS app in iTunesConnect that was originally released a couple of years ago and has received various updates over time. They now wish to stop supporting older versions of the application (1.x) and disable these older versions of the app.
My questions are:
Can we stop users from re-installing old versions of the app? If yes, how?
How do we disable/remove old versions of the app in iTunesConnect?
What is Apple's policy regarding disabling/removing old versions of applications?
I'm not an iOS developer and am unfamiliar with the whole Apple application development process. I have searched the web as well as the Apple developer centre and I've read through the Apple Developer Program Terms and Conditions but I haven't been able to find answers to any of my questions.
I have managed to find information about removing an application from sale but this removes the entire application, rather than just specific versions. (Deleting a free app from iTunesConnect)
David Smith's article (http://david-smith.org/blog/2012/06/20/hacking-paid-upgrades/) on Paid Upgrades mentions the ability to provide fixes for previous versions if they're not deleted from iTunesConnect. When I log into iTunesConnect, I only see the current version of the app listed so I'm assuming prior versions have been deleted already. I would, however, like to confirm that users can no longer download old versions of the app.
This article mentions users being able to download old versions of apps from iCloud (http://www.macrumors.com/2011/06/09/icloud-supports-re-downloading-some-discontinued-apps/) - can we prevent this? One option would be to mark the the version as having a "legal issue" but what ramifications does this have? and if I can't see the app in iTunesConnect then how do I do it?
I found a post asking about how to force a user to upgrade the application every time a new version is released but this doesn't answer my questions either. We want the users to upgrade but we're not wanting to force it programmatically. (Can I force an iPhone user to upgrade an application?)
I've also found lots of posts asking how to revert to previous versions of an app in the app store but again, this is not what we're wanting to do. We're wanting to disable older versions of the app but leave the most recent versions alone.
Before the flame wars begin:
Users that are unable to update to the latest version of the app for whatever reason are able to use a mobile website in place of the app. The website has the exact same functionality.
Can answers please be kept on-topic rather than getting into great debates over whether one should/shouldn't maintain legacy versions.
Thanks in advance :)
Users can typically only ever download the latest version of an application. There are a few ways I think they can get around that but in general only the latest version is available to users via the normal means.
If, however, you absolutely must prevent the old versions from being released you can do so when submitting a new update. Right after you say "Ready for Upload" you will be asked a question about if this update was for a 'legal reason' if you click YES then you will be given the opportunity to disable old versions of the app from download.
As to Apple's policy on this...I have no idea. But I can't think of any policy that would require you to support older versions moving forward.

Can I force a user to upgrade my app?

Can I force a user to upgrade my app? Does Apple recommend it?
Yes, you can. Just check the version number when the application starts and if needed, bail out with an error screen. I don’t think Apple explicitly prohibits this. (And I doubt they would find out during the review.) Of course it’s annoying from the user’s viewpoint, I would only write something like that if there was no other option.
Yes you can force an upgrade to the user. You can call a webservice when your app start and check on your server if an update is available (you have to add an update when an update available on app store). If an update is available then you can present a view that will have the update button. When pressed this button will redirect the user to the installed app store app and open the upgraded app in it. (you should return this url in your webservice). Let me know in comments if you need more explanations.
And I don't know apple recommend this way. But I have seen this in one or two apps.
Extremely bad approach. My perfectly fine working app forces upgrade, which can not be supported due to obsolete iOS. I am not only forced, but moving away from the coupon app in determination to never use it web-based either.
Security issue, if that is the reason for upgrade, should be patched for existing iOS.

way, to enforce upgrade of iphone-app inside app-store?

When releasing multiple versions of an iphone-app, there are problems:
you are running very old apps (still need to support them through server-api)
you have to live with bugs of a certain app, once released blocker-bugs are not fixable
Is there a way to mark an iphone-app as unsupported or enforce an online-update, i.e. when it starts up it will show an upgrade button?
So far I always read that you cannot enforce an upgrade of an iphone-app. Is this correct, can somebody give me official reference/link for that? I just cannot believe that once you released an iphone-app this is for eternity? An "unsupported" marker would be a very helpful app-store feature...
You can not enforce app upgrade, but you can add a mecanism in your app to display a message to say that the version is not compatible with server-api. Of course it should be provide on the first app version...

Downgrading to a previous version of an iphone app

I have an app on appstore.
I uploaded a new version and it was published. But, just after that I realized an important bug in my app. Since the approvement process takes a long time, I want to downgrade to the previous version until the fixed version is approved by Apple.
Are there any way for that?
Thanks
The only way to downgrade is to resubmit the previous version with a new version number, or a new fixed version, and wait until it is approved. If you put a note in the Demo Account section saying this is a rollback or a critical bug fix, there are reports that Apple may perhaps expedite the review. If the bug is bad enough to create very unhappy customers, you can warn customers not to download it in your update notes, and/or you can set the availability date of the current broken version into the future, until your fix is accepted.
Unfortunately not, Apple doesn't provide a means of rolling back to previous versions. If you have the source code, you could always just increment the version number and upload the old version again.
like the other answers have said - unfortunately, Apple does not provide a way to rollback once you've released the app.
The way many major apps deal with this is by instrumenting their app ahead of time with feature flags (https://martinfowler.com/articles/feature-toggles.html): ways to enable/disable features and codepaths from the server.
Granted that implementing feature flags requires foresight and planning (it's unlikely you'll capture every codepath). Fwiw, I started my current company (https://screenplay.dev) out of this frustration; you can read much more on this approach here: itunesconnect App - Revert to previous version :)