Spotify works in offline mode for 30 days. So it will stop working 30 days after the apocalypse but it's a downside I'm willing to accept to have almost any music available in my pocket up until then.
When the apocalypse hits you you need to already have an offline Spotify library on all devices you would like to continue using. Offline Spotify won't help you much if you don't have any media saved for offline use at that point.