SVSConfiguration

Objective-C

@interface SVSConfiguration : NSObject

Swift

class SVSConfiguration : NSObject

This class hold the global configuration of the SDK. All methods called here will impact the whole Video SDK.

Singleton shared instance

  • The shared instance of the SVSConfiguration object.

    Declaration

    Objective-C

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

    Swift

    class var shared: SVSConfiguration { get }

Configuration initialization

  • Configure the SDK for a given siteID. This will customize the SDK behavior for your site ID: for example retrieving automatically your baseURL for faster ad requests, enable specific logging, etc…

    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.

    Declaration

    Objective-C

    - (void)configureWithSiteID:(NSUInteger)siteID;

    Swift

    func configure(withSiteID siteID: UInt)

    Parameters

    siteID

    The siteID for your application in Manage interface. Contact your account manager if you have trouble finding this ID.

Misc configuration options

  • true if the SDK needs to display debug informations in the Xcode console, false otherwise.

    Declaration

    Objective-C

    @property (nonatomic) BOOL loggingEnabled;

    Swift

    var loggingEnabled: Bool { get set }
  • true if location information can be used automatically by the SDK (if available), false 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. Setting this property will override the IDFA of this device when requesting an Ad.

    Declaration

    Objective-C

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

    Swift

    var customIdentifier: String? { get set }
  • The ad rules that will be used for any ad player where ad rules are not specified. Default rule for finite duration content is one preroll ad and one postroll ad. Default rule for live content is one preroll ad.

    Declaration

    Objective-C

    @property (nonatomic, strong) SVSAdRules *_Nonnull defaultAdRules;

    Swift

    var defaultAdRules: SVSAdRules { get set }
  • The ad player configuration that will be used for any ad player where ad player configuration is not specified.

    Declaration

    Objective-C

    @property (nonatomic, strong) SVSAdPlayerConfiguration *_Nonnull defaultAdPlayerConfiguration;

    Swift

    var defaultAdPlayerConfiguration: SVSAdPlayerConfiguration { 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 }

Read-only configuration properties

  • The baseURL for ad calls.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSURL *_Nonnull baseURL;

    Swift

    var baseURL: URL { get }
  • The siteID associated with this SDK configuration.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger siteID;

    Swift

    var siteID: UInt { get }
  • The networkID associated with this SDK configuration.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger networkID;

    Swift

    var networkID: UInt { get }
  • The version of the Video SDK.

    Declaration

    Objective-C

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

    Swift

    var version: String { get }