SASConfiguration

Objective-C

@interface SASConfiguration : NSObject

Swift

class SASConfiguration : NSObject

Hold the configuration of the Smart Display SDK.

Note

This singleton class is used for the initial SDK configuration. This configuration is MANDATORY and should be done before performing any ad call. Check the complete documentation for more information.

Shared instance

  • The shared instance of the SASConfiguration object.

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) NS_SWIFT_NAME(shared) SASConfiguration *sharedInstance;

    Swift

    class var shared: SASConfiguration { get }

Read only SDK properties

  • The site id used by your application.

    Declaration

    Objective-C

    @property (nonatomic, readonly) unsigned long siteId;

    Swift

    var siteId: UInt { get }
  • The base URL used for ad calls.

    Declaration

    Objective-C

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

    Swift

    var baseURL: String? { get }
  • The manual base URL used for ad calls if defined, nil otherwise.

    Setting this URL will override the base URL set for your network.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSString *manualBaseURL;

    Swift

    unowned(unsafe) var manualBaseURL: NSString? { get set }

Configurable SDK properties

  • YES if the SDK needs to display debug informations in the Xcode console, NO otherwise.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isLoggingEnabled) BOOL loggingEnabled;

    Swift

    var loggingEnabled: Bool { get set }
  • YES if location information can be used automatically by the SDK (if available), NO otherwise.

    Declaration

    Objective-C

    @property (nonatomic) BOOL allowAutomaticLocationDetection;

    Swift

    var allowAutomaticLocationDetection: Bool { get set }
  • Coordinate that will be used instead of the actual device location (for testing purpose for instance), kCLLocationCoordinate2DInvalid otherwise (default value).

    Declaration

    Objective-C

    @property (nonatomic) CLLocationCoordinate2D manualLocation;

    Swift

    var manualLocation: CLLocationCoordinate2D { get set }
  • The custom identifier for this device. This property will be sent along with the IDFA of this device, if available, when requesting an ad.

    Note

    Providing an empty string will be considered as providing nil.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *customIdentifier;

    Swift

    var customIdentifier: String? { get set }
  • Ad call timeout in seconds.

    The value set must be equal to or greater than 1, otherwise the default timeout of 10s will be used.

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval adCallTimeout;

    Swift

    var adCallTimeout: TimeInterval { get set }
  • YES if the configureWithSiteID method has been called, NO otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isConfigured) BOOL configured;

    Swift

    var isConfigured: Bool { get }
  • Deprecated

    Use the secondaryImplementationInfo property instead

    YES if the SDK is used as a Primary SDK, NO otherwise.

    Declaration

    Objective-C

    @property (nonatomic, getter=isPrimarySDK) BOOL primarySDK;

    Swift

    var primarySDK: Bool { get set }
  • Additional implementation information that can be provided to the SDK when integrated as secondary SDK.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) SASSecondaryImplementationInfo *secondaryImplementationInfo;

    Swift

    var secondaryImplementationInfo: SASSecondaryImplementationInfo? { get set }
  • The bundle for localized strings - See documentation for keys. By default the strings of the framework bundle will be used.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSBundle *_Nonnull stringsBundle;

    Swift

    var stringsBundle: Bundle { get set }

Configuration method

  • Configures the SDK for a given siteId. This will customize the SDK behavior for your site id.

    Note

    This method MUST be called before performing any ad request and only once per application’s lifecycle. Make sure you call this method in the application:didFinishLaunchingWithOptions: method of your application’s delegate.

    If you don’t know your siteId, please contact your sales house which can retrieve them from its Smart account (sites & pages).

    Declaration

    Objective-C

    - (void)configureWithSiteId:(NSInteger)siteId;

    Swift

    func configure(siteId: Int)

    Parameters

    siteId

    The site id used by your application.

  • Deprecated

    use configureWithSiteId: instead

    Configures the SDK for a given siteId. This will customize the SDK behavior for your site id.

    @deprecated This method is deprecated, use configureWithSiteId: instead. If you need to manually override the base URL, please use the manualBaseURL property.

    Declaration

    Objective-C

    - (void)configureWithSiteId:(NSInteger)siteId
                        baseURL:(nonnull NSString *)baseURL;

    Swift

    func configure(siteId: Int, baseURL: String)

    Parameters

    siteId

    The site id used by your application.

    baseURL

    The base URL , but this will have no effect anymore, use manualBaseURL property instead.