Cross-platform way of storing configuration files?

Is there any cross-platform way of storing configuration settings?

I would be very flexible concerning the format (XML, YML, JSON, CSV, TXT, SQLITE, whatever).

The main question is: Is there a way which supports all of the following platforms or do I need to store them in a platform-agnostic way, e.g. %APPDATA% on Windows, $XDG_CONFIG_HOME on Linux etc?

  • Desktop (Windows, Linux and Mac)
  • Mobile (iOS, Android, UWP)

You can use IsolatedStorage - it will care for the storing in user space for example

1 Like

Hi! I faced the same problem and I resolved it by abstracting a “SettingsRepository”: example here from my repository, and by implementing it differently for each platform: