SASAdPlacement

Objective-C

@interface SASAdPlacement : NSObject <NSCoding, NSCopying>

Swift

class SASAdPlacement : NSObject, NSCoding, NSCopying

Represents an ad placement.

An ad placement aggregates several information like the site id, page id and format id that will be used when loading an ad.

You can use some optional parameters to forward a keyword targeting string or to create exclusion using the master flag.

Placement properties

  • The site id that should be used when loading an ad.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger siteId;

    Swift

    var siteId: Int { get }
  • The page id (if the page name is not set) that should be used when loading an ad.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger pageId;

    Swift

    var pageId: Int { get }
  • The page name (if the page id is not set) that should be used when loading an ad.

    Declaration

    Objective-C

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

    Swift

    var pageName: String? { get }
  • The format id that should be used when loading an ad.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger formatId;

    Swift

    var formatId: Int { get }
  • YES if the master flag that should be used when loading an ad, NO otherwise.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL master;

    Swift

    var master: Bool { get }
  • A set of keywords that will be used when loading an ad to receive more relevant advertising.

    Keywords are typically used to target ad campaign insertions at specific user segments. They should be formatted as comma-separated key-value pairs (e.g. “gender=female,age=27”).

    On the Smart manage interface, keyword targeting options can be found under the Targeting / Keywords section when managing campaign insertions.

    Declaration

    Objective-C

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

    Swift

    var keywordTargeting: String? { get }
  • A set of keywords that will be used when loading an ad to receive more relevant advertising if needed, nil otherwise.

    Keywords are typically used to target ad campaign insertions at specific user segments.

    On the Smart manage interface, keyword targeting options can be found under the Targeting / Keywords section when managing campaign insertions.

    A string representing the Supply Chain Object that will be passed to Smart AdServer during AdCalls.

    You should fill this parameter if you are reselling inventory from direct publishers. You can find more information about Supply Chain Object at this URL:

    https://help.smartadserver.com/s/article/Sellers-json-and-SupplyChain-Object

    If nil, no Supply Chain Object will be added to the ad call and Smart will add its own node.

    Declaration

    Objective-C

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

    Swift

    var supplyChainObjectString: String? { get }
  • A dictionary used to pass extra parameters to the mediation context.

    Some Third Party SDKs rely on those extra parameters.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDictionary<NSString *, id> *mediationExtraParameters;

    Swift

    var mediationExtraParameters: [String : Any]? { get set }
  • URL of the content displayed alongside the ad if any, nil otherwise.

    The URL provided will be sent in the ad call to enabled semantic targeting.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSURL *contentURL;

    Swift

    var contentURL: URL? { get set }
  • An array of SASSellerDefinedAudience objects related to this SASAdPlacement, if any. Nil otherwise.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<SASSellerDefinedAudience *> *sellerDefinedAudiences;

    Swift

    var sellerDefinedAudiences: [SASSellerDefinedAudience]? { get set }
  • An array of SASSellerDefinedContent objects related to this SASAdPlacement, if any. Nil otherwise.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray<SASSellerDefinedContent *> *sellerDefinedContents;

    Swift

    var sellerDefinedContents: [SASSellerDefinedContent]? { get set }

Initializers

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId;

    Swift

    init(siteId: Int, pageName: String, formatId: Int)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageName: String, formatId: Int, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int, keywordTargeting: String?)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                   supplyChainObjectString:
                       (nullable NSString *)supplyChainObjectString;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int, keywordTargeting: String?, supplyChainObjectString: String?)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int, keywordTargeting: String?, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                    pageId:(NSInteger)pageId
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                   supplyChainObjectString:
                       (nullable NSString *)supplyChainObjectString
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageId: Int, formatId: Int, keywordTargeting: String?, supplyChainObjectString: String?, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting;

    Swift

    init(siteId: Int, pageName: String, formatId: Int, keywordTargeting: String?)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                   supplyChainObjectString:
                       (nullable NSString *)supplyChainObjectString;

    Swift

    init(siteId: Int, pageName: String, formatId: Int, keywordTargeting: String?, supplyChainObjectString: String?)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageName: String, formatId: Int, keywordTargeting: String?, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSiteId:(NSInteger)siteId
                                  pageName:(nonnull NSString *)pageName
                                  formatId:(NSInteger)formatId
                          keywordTargeting:(nullable NSString *)keywordTargeting
                   supplyChainObjectString:
                       (nullable NSString *)supplyChainObjectString
                                    master:(BOOL)master;

    Swift

    init(siteId: Int, pageName: String, formatId: Int, keywordTargeting: String?, supplyChainObjectString: String?, master: Bool)

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Initialize a new instance of SASAdPlacement corresponding to a test ad.

    A test ad will always deliver and will always be from a specific type. You can use these tests to verify that your integration will work properly with all types of ads.

    Available test ads are listed in the SASAdPlacementTest object.

    Warning

    If you set a test placement, make sure to remove it before submitting your application to the App Store.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTestAd:(SASAdPlacementTest)type;

    Swift

    init(testAd type: SASAdPlacementTest)

    Parameters

    type

    The type of ad you want to get for ad calls.

    Return Value

    An initialized instance of SASAdPlacement corresponding to a test ad.

Convenience initializers

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                           pageId:(NSInteger)pageId
                                         formatId:(NSInteger)formatId;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                           pageId:(NSInteger)pageId
                                         formatId:(NSInteger)formatId
                                           master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                         pageName:(nonnull NSString *)pageName
                                         formatId:(NSInteger)formatId;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                         pageName:(nonnull NSString *)pageName
                                         formatId:(NSInteger)formatId
                                           master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                           pageId:(NSInteger)pageId
                                         formatId:(NSInteger)formatId
                                 keywordTargeting:
                                     (nullable NSString *)keywordTargeting;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)
          adPlacementWithSiteId:(NSInteger)siteId
                         pageId:(NSInteger)pageId
                       formatId:(NSInteger)formatId
               keywordTargeting:(nullable NSString *)keywordTargeting
        supplyChainObjectString:(nullable NSString *)supplyChainObjectString;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                           pageId:(NSInteger)pageId
                                         formatId:(NSInteger)formatId
                                 keywordTargeting:
                                     (nullable NSString *)keywordTargeting
                                           master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)
          adPlacementWithSiteId:(NSInteger)siteId
                         pageId:(NSInteger)pageId
                       formatId:(NSInteger)formatId
               keywordTargeting:(nullable NSString *)keywordTargeting
        supplyChainObjectString:(nullable NSString *)supplyChainObjectString
                         master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageId

    The pageId created on the Smart manage interface. It is recommanded to create a new page id for every unique screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                         pageName:(nonnull NSString *)pageName
                                         formatId:(NSInteger)formatId
                                 keywordTargeting:
                                     (nullable NSString *)keywordTargeting;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)
          adPlacementWithSiteId:(NSInteger)siteId
                       pageName:(nonnull NSString *)pageName
                       formatId:(NSInteger)formatId
               keywordTargeting:(nullable NSString *)keywordTargeting
        supplyChainObjectString:(nullable NSString *)supplyChainObjectString;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId
                                         pageName:(nonnull NSString *)pageName
                                         formatId:(NSInteger)formatId
                                 keywordTargeting:
                                     (nullable NSString *)keywordTargeting
                                           master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object.

    Declaration

    Objective-C

    + (nonnull instancetype)
          adPlacementWithSiteId:(NSInteger)siteId
                       pageName:(nonnull NSString *)pageName
                       formatId:(NSInteger)formatId
               keywordTargeting:(nullable NSString *)keywordTargeting
        supplyChainObjectString:(nullable NSString *)supplyChainObjectString
                         master:(BOOL)master;

    Parameters

    siteId

    The siteId created on the Smart manage interface. Create a new site id for every unique application on your network.

    pageName

    The pageName created on the Smart manage interface. It is recommanded to create a new page name for every screen in your application.

    formatId

    The formatId created on the Smart manage interface. It is recommanded to create a new format id for every type of ad you will integrate in your application.

    keywordTargeting

    A string representing a set of keywords that will be passed to Smart to receive more relevant advertising.

    supplyChainObjectString

    A string representing the Supply Chain Object that will be passed to Smart AdServer during ad calls.

    master

    The master flag. If this is YES, the a Page view will be counted. This should have the YES value for the first ad on the page, and NO for the others (if you have more than one ad on the same page).

    Return Value

    An initialized instance of SASAdPlacement.

  • Returns an initialized SASAdPlacement object corresponding to a test ad.

    A test ad will always deliver and will always be from a specific type. You can use these tests to verify that your integration will work properly with all types of ads.

    Available test ads are listed in the SASAdPlacementTest object.

    Warning

    If you set a test placement, make sure to remove it before submitting your application to the App Store.

    Declaration

    Objective-C

    + (nonnull instancetype)adPlacementWithTestAd:(SASAdPlacementTest)type;

    Parameters

    type

    The type of ad you want to get when loading ads.

    Return Value

    An initialized instance of SASAdPlacement corresponding to a test ad.