Rudimentary state persistence for iOS.