Adds a way to change the config at runtime, which is useful when changing the API host based on app environment for example. Any changes made to MixpanelSettings.Instance will be copied over after manually initializing the library.
Closes #101 (this PR is more general-purpose)
Closes #148
MixpanelSettings.Instance.APIHostAddress = "https://myproxy.com";
...
// valid but redundant since Init() will call this automatically
MixpanelSettings.Instance.ApplyToConfig();
Mixpanel.Init();
After initialization:
Mixpanel.Init();
MixpanelSettings.Instance.APIHostAddress = "https://myproxy.com";
...
// must call this for changes to take effect since changes were made after Init().
MixpanelSettings.Instance.ApplyToConfig();
Adds a way to change the config at runtime, which is useful when changing the API host based on app environment for example. Any changes made to
MixpanelSettings.Instance
will be copied over after manually initializing the library.Closes #101 (this PR is more general-purpose) Closes #148
Usage
Before initialization:
After initialization: