IGameServiceConfigurationService
@objc public protocol IGameServiceConfigurationService: NSObjectProtocol
An interface defining a service for managing GameServiceConfiguration objects.
This object will get populated directly from a valid gameService.configurations node in a manifest.
-
Returns the active configuartion key, an empty string if not is set.
Declaration
Swift
var activeConfigKey: String -
Returns
[String: GameServiceConfiguration]of all currently tracked configurations.Declaration
Swift
var allConfigurations: [String: GameServiceConfiguration] -
Returns the active configuration
Declaration
Swift
func getActiveConfiguration() -> GameServiceConfiguration?Return Value
GameServiceConfiguration, nil if there is no active configuration. -
Attempt to set a configuration as active.
Declaration
Swift
func setActiveConfiguration(key: String) -> BoolParameters
keyThe configuration key.
Return Value
true if the configuation was successful set, false if unsuccessful. Could fail if the key doesn’t exist or the configuartion for the key is invalid.
-
Attempt to add a configuration to the manager configuartions
Declaration
Swift
func addConfiguration(key: String, config: GameServiceConfiguration) -> BoolParameters
keyThe reference key to assign for the configuartion.
configThe
GameServiceConfigurationto set.Return Value
true if added successfully, false if it failed to add. Could fail if the params are null / empty / invalid or there is already a configuration set for the key.
-
Gets the full path for a provided endpoint key
Declaration
Swift
func getEndpointPath(key: String) -> String?Parameters
keyEndpoint key
Return Value
Returns the full endpoint path, will be nil if the key is invalid / not found.
-
Attempt to add an endpoint to the configuartion service.
Declaration
Swift
func addEndpoint(key: String, endpointPath: String) -> BoolParameters
endpointPathAn endpoint string.
Return Value
True if added successfully, false if fails to add. It can fail if the key or endpoint is invalid or there is already an endpoint set for the key.
-
Attempt to add an endpoint to the configuartion service.
Declaration
Swift
func addEndpoint(key: String, endpoint: Endpoint) -> BoolParameters
keyThe reference key for the endpoint.
endpointThe
Endpointobject.Return Value
True if added successfully, false if fails to add. It can fail if the key or endpoint is invalid or there is already an endpoint set for the key.
IGameServiceConfigurationService Protocol Reference