[iOS app] Preserve settings for panel mode website

Hello,

Today, settings for the website selected in Panel mode view are lost when restarting the mobile app on IOS devices. I created an issue for this #1289 about 4 years ago, but this has never been fixed. Yesterday, I was asked to create a feature request for this.

To Reproduce

  1. Create a web view and add an iframe pointing to a website in need of preserving user settings (in my example I’m using a local installation of Mopidy server with HTTP extension)
  2. Change some settings that you’d like to be preserved by the website shown in the iframe, e.g. the theme of the app
  3. Check that the new settings were successfully applied
  4. Close iOS HA app companion and open it again
  5. Access the view with the iframe and notice how the user settings were lost after app restart

Expected behavior
User settings in the iframe should be preserved (they need to be persisted in the companion app)

Additional context
Note that when using HA web UI in Safari, settings are correctly preserved after Safari restart

According to this blog post, it should be doable by setting the cookies directly through the web view API.