ServiceConfig

public class ServiceConfig

AeroGear Mobile Services Configuration Entrypoint for parsing and processing configuration for individual services.

This class is responsible for providing configurations for services of certain types. Configuration is stored in single json file that contains multiple individual service configurations and metadata. Service developers can query configuration for certain types. See top level core interface for more information

  • Example usage: config['myServiceType']
  • Undocumented

    Declaration

    Swift

    public init(_ configFileName: String = "mobile-services")
  • Fetch configuration for specific type

    • return: MobileService array

    Declaration

    Swift

    public func getConfigurationByType(_ type: String) -> [MobileService]

    Parameters

    type

    type of the service to fetch

  • Fetch configuration for specific id Should be used for elements that can appear multiple times in the config

    • return: MobileService

    Declaration

    Swift

    public func getConfigurationById(_ id: String) -> MobileService?

    Parameters

    id

    unique id of the service