Notify user about app update

In Ionic2, how to create a system that notify the user that there is a new version of your app on the Apple store, Google store, Window store, etc… ?

This is a similar topic How to notify the app update available on playstore
but it didn’t say which function to call, how to implement the mechanism.

Do I have to create my own server and keep track of the version ?
Any API of Google and Apple to call ?

You know when a new version is available - ou put it there. So you “only” need a mechanism to inform the users like push notifications (if the user should be informed even if he doesn’t open the app) or a polling mechanism.