A few years ago, Tamagotchi came back into the public spotlight when the Tamagotchi LIFE app released in the USA. In international regions the app eventually released as "Tamagotchi Classic". When both the Tamagotchi LIFE apps were discontinued a few years, the games still lived on on international app stores (though the original LIFE app was split into two separate apps as opposed to being one app).
The Tamagotchi Classic app continued to receive updates for bug fixes, Apple Watch and iMessage support, and is still available on the app store to this day. The other two apps - Tamagotchi Classic Gen 2 and Tamagotchi Angel - received no updates during their entire lifespan and were eventually removed from both the App Store and the Google Play Store. Anyone that had purchased the apps could redownload them and continue playing.
For iOS devices, the new iOS 11 update brings the final nail in the coffin for these two apps: iOS 11 only runs apps in 64-bit, and these two apps were 32-bit. Updating to iOS 11 will kill these apps, so keep that in mind when you decide to update. I imagine the original LIFE apps will face the same fate.
If you're on an Android device, the apps will survive a little bit longer. If you've got the apps or apks downloaded on your PC, make sure to keep them safe! They're a small piece of history which can't be recovered anymore, and will eventually fade into obscurity.