Load/save last state for iOS

Hi, just wondered if there’s anything in the framework for storing/resuming last state for an iOS app when the app is launched/exited, (i.e. calls to getStateInformation/setStateInformation with some standard location) or whether we need to do this ourselves?

Are there any state transition notifications sent for these operations?


Hi Leehu, I have an iOS app in which I’m currently implementing state saving. Here’s what I’ve found…

  1. State saving works when using app as an auv3 inside some host (e.g. audiobus/AUM/apematrix) via saving the session
  2. State saving doesn’t seem to work in the iOS standalone app (getstateinformation does seem to be called when I close the app, however, state saving does work in the standalone (and vst3) app in Windows)

If the iOS standalone cannot save state upon closing the app I will consider manually saving a local preset file (say every 2 seconds).

Could the JUCE team please clarify whether or not standalone state saving should be possible?


Hi, FYI, I do all mine manually.

take a look at my ScopedValueSaver thread in Useful Tools and Components!!!

@leehu thanks. Would you mind breifly describing how you do that? Is it a local preset file being saved on a timer or do you require the user to manually save a preset ?

@matkatmusic thanks, i did see this on Josh’s discord. It does sound very interesting and I will certainly consider it (also for future projects)

It’s a local properties file that’s saved when users do certain things that warrant saving, e.g. select an option, check a toggle switch etc. this is reloaded at app startup.