Previously, UberRides used a Configuration class that contained a lot of global state / static properties. This is not ideal for keeping state scroll multiple frameworks (or a single framework for that matter). With the exception of the sandbox property, these were all made non-static.
This PR consolidates the ConfigurationProvider from UberAuth and the Configuration from UberRides and moves dependencies to UberCore so both can use it.
⚠️ Breaking Change ⚠️: In the Info.plist, the UberAuth configuration has been renamed to Uber.
Ex. Configuration values in the plist will need to change from UberAuth/ClientID -> Uber/ClientID
Changes
Dependencies moved to UberCore
UberApp was made public and moved to UberCore.
Required config values will assert
Any required configuration values will now throw a precondition failure in ConfigurationProvider. This was done to make them non-optional. If they are not found in the Info.plist, the SDK will crash at runtime.
Renamed this class to ConfigurationProvider to match the er/ing pattern.
Updated Configuration references
Any references to the legacy Configuration class have been updated to use the equivalent ConfigurationProvider property.
In some cases, this is no longer a static property, so an instance of ConfigurationProvider was added to the calling class.
Description
Previously, UberRides used a Configuration class that contained a lot of global state / static properties. This is not ideal for keeping state scroll multiple frameworks (or a single framework for that matter). With the exception of the
sandbox
property, these were all made non-static. This PR consolidates the ConfigurationProvider from UberAuth and the Configuration from UberRides and moves dependencies to UberCore so both can use it.⚠️ Breaking Change ⚠️: In the Info.plist, the
UberAuth
configuration has been renamed toUber
. Ex. Configuration values in the plist will need to change fromUberAuth/ClientID
->Uber/ClientID
Changes
Dependencies moved to UberCore
UberApp was made public and moved to UberCore.
Required config values will assert
Any required configuration values will now throw a precondition failure in ConfigurationProvider. This was done to make them non-optional. If they are not found in the Info.plist, the SDK will crash at runtime.
DefaultConfigurationProvider -> ConfigurationProvider
Renamed this class to ConfigurationProvider to match the er/ing pattern.
Updated Configuration references
Any references to the legacy Configuration class have been updated to use the equivalent ConfigurationProvider property. In some cases, this is no longer a static property, so an instance of ConfigurationProvider was added to the calling class.
Testing
Existing unit tests pass