what does it take for .snap package to be automatically updated from snap store ?
- is it some configuration on the ubuntu core.
- whether .snap package (app) should have code to work with store and update
First of all, at the time of this writing, on the desktop snaps are not automatically updated (they must be manually refreshed). This is a known bug and is being fixed. If that's why you're asking the question, keep that in mind :) .
To actually answer your question: snaps installed from the store are automatically updated when a new version is published in the store, in the same channel. Period. It's super easy-- you shouldn't need to do anything. To make this more clear, let's walk through an example.
Say you had snap foo
, built with Snapcraft as foo_1_amd64.snap
. You can run snapcraft upload
to upload it to the store, or you can do it yourself by visiting MyApps. Once it passes the automated review, you can publish it into one or more channels (the one used by Snappy by default is stable
, so that should contain your stable releases).
Now you can run sudo snap install foo
and it'll install your newly published snap, version 1. Ignoring the known issue outlined above, if you publish another version of the foo
snap in the same channel, you'll notice that eventually the installed foo
is updated to the new version. I say "eventually" since updates are randomly staggered throughout the day.