SASAdPlacement
Objective-C
@interface SASAdPlacement : NSObject
Swift
class SASAdPlacement : NSObject
Object that 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.
-
The site id that should be used when loading an ad.
Declaration
Objective-C
@property (readonly) NSInteger siteId;
Swift
var siteId: Int { get }
-
The page id that should be used when loading an ad.
Declaration
Objective-C
@property (readonly) NSInteger pageId;
Swift
var pageId: Int { get }
-
The format id that should be used when loading an ad.
Declaration
Objective-C
@property (readonly) NSInteger formatId;
Swift
var formatId: Int { get }
-
A set of keywords that will be used when loading an ad to receive more relevant advertising if necessary, nil otherwise.
Declaration
Objective-C
@property (readonly, nullable) NSString *keywordTargeting;
Swift
var keywordTargeting: String? { get }
-
An array of SASSellerDefinedAudience objects related to this SASAdPlacement, if any. Nil otherwise.
Declaration
Objective-C
@property (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 (strong, nullable) NSArray<SASSellerDefinedContent *> *sellerDefinedContents;
Swift
var sellerDefinedContents: [SASSellerDefinedContent]? { get set }
-
A Supply Chain Object string representation that will be sent during ad loading to receive more relevant advertising if needed, nil otherwise.
You should provide a Supply Chain Object if you are reselling inventory from direct publishers.
You can find more information about Supply Chain Object in the official Equativ documentation:
https://help.smartadserver.com/s/article/Sellers-json-and-SupplyChain-Object
You can also find more information on how to serialize a Supply Chain Object into a string in the official IAB documentation:
Declaration
Objective-C
@property (strong, nullable) NSString *supplyChainObjectString;
Swift
var supplyChainObjectString: String? { get set }
-
A dictionary of client side parameters that will be forwarded to the mediation adapters if necessary, nil otherwise.
Declaration
Objective-C
@property (strong, nullable) NSDictionary<NSString *, id> *mediationClientSideParameters;
Swift
var mediationClientSideParameters: [String : Any]? { get set }
-
Initialize a new instance of SASAdPlacement.
Declaration
Objective-C
- (nonnull instancetype)initWithSiteId:(NSInteger)siteId pageId:(NSInteger)pageId formatId:(NSInteger)formatId;
Swift
convenience init(siteId: Int, pageId: Int, formatId: Int)
Parameters
siteId
The site id that should be used when loading an ad.
pageId
The page id that should be used when loading an ad.
formatId
The format id that should be used when loading an ad.
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 site id that should be used when loading an ad.
pageId
The page id that should be used when loading an ad.
formatId
The format id that should be used when loading an ad.
keywordTargeting
A set of keywords that will be used when loading an ad to receive more relevant advertising if necessary, nil otherwise.
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
convenience init(testAd type: SASAdPlacementTest)
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.
-
Returns an initialized SASAdPlacement object.
Declaration
Objective-C
+ (nonnull instancetype)adPlacementWithSiteId:(NSInteger)siteId pageId:(NSInteger)pageId formatId:(NSInteger)formatId;
Parameters
siteId
The site id that should be used when loading an ad.
pageId
The page id that should be used when loading an ad.
formatId
The format id that should be used when loading an ad.
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 site id that should be used when loading an ad.
pageId
The page id that should be used when loading an ad.
formatId
The format id that should be used when loading an ad.
keywordTargeting
A set of keywords that will be used when loading an ad to receive more relevant advertising if necessary, nil otherwise.
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.