SWConfigurationBuilder
public class SWConfigurationBuilder : NSObject
This builder is used to create an immutable SWConfiguration instance.
-
If you set this to true, the SplytWidget will ask your user for permission to access their location. If your app already implements this functionality, do not set this value. The SplytWidget will check if access has been granted, and attempt to use the device location. The default is false, in this scenario, SplytWidget will never ask your user for permission.
Declaration
Swift
@objc public func set(requestLocationPermission: Bool) -> SWConfigurationBuilder -
Set the pre-configured ride parameters.
Declaration
Swift
@objc public func set(rideParameters: SWRideParameters?) -> SWConfigurationBuilder -
Required: Set your unique PartnerID, this will be provided to you from Splyt.
Declaration
Swift
@objc public func set(partnerId: String) -> SWConfigurationBuilder -
Required: Set a default location for the SplytWidget. This is used to center the map if a user does not allow the SplytWidget to access their location.
Declaration
Swift
@objc public func set(defaultLocation: SWLocation) -> SWConfigurationBuilder -
Set the language in which you wish to display the SplytWidget.
Declaration
Swift
@objc public func set(locale: String) -> SWConfigurationBuilder -
Set which Widget environment to use.
Declaration
Swift
@objc public func set(environment: SWEnvironment) -> SWConfigurationBuilder -
Set the logging level required, useful for issues during development. Logging is turned off by default.
Declaration
Swift
@objc public func set(logLevel: SWLogLevel) -> SWConfigurationBuilder -
Sets the primary color used. Used for buttons, and other UI elements.
Declaration
Swift
@objc public func set(primaryColor: String) -> SWConfigurationBuilder -
Sets the secondary color used. Used for text, should contrast the primary color.
Declaration
Swift
@objc public func set(secondaryColor: String) -> SWConfigurationBuilder -
Sets the default error message.
Declaration
Swift
@objc public func set(defaultErrorMessage: String) -> SWConfigurationBuilder -
Sets the no internet error message.
Declaration
Swift
@objc public func set(noInternetErrorMessage: String) -> SWConfigurationBuilder -
Sets the text for the try again button.
Declaration
Swift
@objc public func set(tryAgainButtonTitle: String) -> SWConfigurationBuilder
-
Build an immutable instance of
SWConfiguration.Declaration
Swift
@objc public func build() -> SWConfiguration
SWConfigurationBuilder Class Reference