So once in a while, when Spotify updates their clients, Spotify will show a banner that says an update will be performed when restarted.
How does spotify make this work?
I'm assuming it must be something different, since most software needs you to redownload the binary´, and then perform a more or less assisted reinstall.
Example: When VLC has an update, it always tells you when you run VLC to watch something, but instead of just having a one-button "update and restart", it will download the installer and run the installer, but this is a lot more button presses than just doing what Spotify does.
Spotify downloads the installer and puts it somewhere in the AppData folder and relaunches itself. On launch, if an installer for a newer version is present it'll launch the installer in silent mode and exit. Once the installer has updated the client, it'll automatically relaunch the newer client.
This slightly odd sequence of events means that if the user ignores the banner and exits the client normally, it'll still get updated on next launch. I believe Google Chrome uses a similar mechanism.
Related
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.
I created a new macOS project in Xcode 11.4 where the language is Swift and user interface is SwiftUI. Without making any changes to the code in the project, the app will disappear from the dock by performing the following steps:
launch the Mac app by running the Xcode project
close the main window of the Mac app
select another running app such as Safari
the original Mac app disappears from the dock with no way to access it
This behavior does not happen if the window of the Mac app is open. I can select other running apps then go back to the original Mac app with no problems.
This behavior is known as Automatic Termination. I find it a misfeature, but Apple considers it a feature.
Your app may not have actually quit. It may just appear to have quit. "Launching" it again will just make it reappear in the Dock. It's also possible that some apps which look like they're still running have actually been terminated by the system. In theory, if you try to switch to them, they will be launched and told to restore their previous state to maintain the illusion that they were running all along. In practice, apps (even Apple's) rarely properly restore things to exactly how they were.
The process list in Activity Monitor is a true reflection for what is and is not actually running. Look there to determine if your app has really been terminated.
A developer is supposed to have to opt-in to Automatic Termination because it requires explicit coding of state restoration. However, Xcode's app project/target templates have it enabled by default. You can remove the NSSupportsAutomaticTermination key from your Info.plist to disable it.
Likewise, you'll presumably want to disable Sudden Termination, too, if you're not prepared to support it. You would remove the NSSupportsSuddenTermination key.
Nothing has changed with the setup and it worked like a charm the first launch.
But now that i've already install to desktop, and then deleted it, it never fires the beforeinstallprompt again.
Lighthouse audit even says everything is configured correctly to prompt user to install. I did Application -> Clear Site Data with all options checked, clear cache and reload, and still nothing.
It's like Chrome is tracking that the desktop install has already happened in its own registry, and there is no way to tell it to reset that.
Anybody have any ideas?
Thanks!
Klaus
Have you removed the app?
Many people do not know to go here to see it. Put this in the address bar:
chrome://apps/
I need to have a chrome app quit based on a js script, but after I've looked through Google's list of JS APIs for Chrome Apps, I'm not convinced there is a way sadly. I've tried having the program throw errors at itself, but chrome simply ignores them and moves on. By the way, this is for Chrome OS.
Perhaps the simplest hack to make a chrome app "quit" would be to set chrome.storage.local.set({dont_start:1}) and then chrome.runtime.reload() and make sure the onLaunched event listener, instead of doing the normal thing like opening an app window, instead checks first if dont_start is set, and deletes that key, and just does nothing (instead of launching the app). Then in about 30 seconds or so the event page will go inactive.
I have a Windows Store App that, of course, runs fine on my dev machine.
After creating the package to side load for testing, I installed it on another (desktop) machine. Using the instructions for side-loading contained on pages 25 and 26 of Brundritt's free ebook "Location Intelligence for Windows Store Apps", my app seems to install just fine, except that the app is not added to the Windows 8.1 start screen at the end, as expected.
Nevertheless, I can find the app via the Search functionality - I type the name, it shows up in the "found" list (with its logo), but when I try to run it, the splash screen simply "flashes" and then the app disappears. It icon is indeed parked on the taskbar, and every time I click it, the splash screen flashes, but that's all.
This is a Windows 8.1 app that contains a Bing Map, SQLite (and sqlite-net), as well as ExifLib.
It does show up in Task Manager's "App History" tab.
How can I rectify this problem, or at least determine what the problem might be?
UPDATE
This may (or may not be) significant: the version of the app I sideloaded was built in debug mode. Do I need to build in release mode for this to work?
Also: After building in release mode (for the first time) on the dev machine, it no longer finds the SQLite data that had formerly existed. Does changing from debug to release change the path to the database or something?
Does this help? http://blogs.msdn.com/b/vcblog/archive/2012/09/28/10354327.aspx It appears that the app needs to be built in release mode to work properly.