AerisWeather

Objective-C

@interface AerisWeather : NSObject

Swift

class AerisWeather : NSObject

The AerisWeather object is a singleton class instance that sets up and manages the account requirements that are needed before the SDK can interact with the Aeris APIs. Before you can perform any data requests using the SDK you must first initialize the SDK with your Aeris account using your unique account credentials:

[AerisWeather startWithApiKey:@"__API_KEY__" secret:@"__SECRET_KEY__"];

  • The Aeris account currently associated with the SDK session.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) AWFAerisAccount *account;

    Swift

    var account: AWFAerisAccount? { get }
  • The API key associated with the active Aeris account.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *apiKey;

    Swift

    var apiKey: String? { get }
  • The API secret key associated with the active Aeris account.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *secretKey;

    Swift

    var secretKey: String? { get }
  • The unique bundle identifier for the current application.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *appIdentifer;

    Swift

    var appIdentifer: String? { get }
  • The version number for the current application.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *appVersion;

    Swift

    var appVersion: String? { get }
  • A Boolean value indicating whether or not the SDK is in debug mode. If YES, then more debug information will be output to the debug console during testing. The default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL debugMode;

    Swift

    var debugMode: Bool { get set }
  • The current version of the SDK.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull version;

    Swift

    var version: String { get }
  • Initializes the SDK for the Aeris account associated with the specified API key and secret.

    Declaration

    Objective-C

    + (void)startWithApiKey:(nonnull NSString *)apiKey
                     secret:(nonnull NSString *)secretKey;

    Swift

    class func start(withApiKey apiKey: String, secret secretKey: String)

    Parameters

    apiKey

    The account’s API key

    secretKey

    The account’s API secret key

  • Returns the server path to use for all API requests.

    Declaration

    Objective-C

    + (nonnull NSString *)apiServerPath;

    Swift

    class func apiServerPath() -> String
  • Sets the server path to use for all data API requests.

    You shouldn’t need to set this value unless you are using your own CDN in front of all Aeris data API requests. Setting this value to nil will use the default server path for all data API requests. This value must contain the protocol and host for the server:

    [AerisEngine setApiServerPath:@"https://cdn.mydomain.com"];

    Declaration

    Objective-C

    + (void)setApiServerPath:(nullable NSString *)serverPath;

    Swift

    class func setApiServerPath(_ serverPath: String?)

    Parameters

    serverPath

    The custom server path to use for data API requests

  • Returns the server path to use for all map API requests.

    Declaration

    Objective-C

    + (nonnull NSString *)ampServerPath;

    Swift

    class func ampServerPath() -> String
  • Sets the server path to use for all map API requests.

    You shouldn’t need to set this value unless you are using your own CDN in front of all Aeris Maps API requests. Setting this value to nil will use the default server path for all map API requests. This value must contain the protocol and host for the server:

    [AerisEngine setAmpServerPath:@"https://cdn.mydomain.com"];

    Declaration

    Objective-C

    + (void)setAmpServerPath:(nullable NSString *)serverPath;

    Swift

    class func setAmpServerPath(_ serverPath: String?)

    Parameters

    serverPath

    The custom server path to use for map API requests

  • Returns the Aeris Weather singleton instance.

    Declaration

    Objective-C

    + (nonnull instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self
  • Returns a Boolean value indicating whether the SDK has been initialized with a valid Aeris account and all account permissions have been setup.

    Declaration

    Objective-C

    + (BOOL)isReady;

    Swift

    class func isReady() -> Bool