XAAdvertisement Class Reference
Inherits from | NSObject |
---|---|
Declared in | XAAdvertisement.h |
Overview
The XAAdvertisement
is the main business object that contains all the necessary information
for ad playback.
Initialize an Advertisement
+ advertisementWith:
Create an advertisement from a dictionary of values
+ (XAAdvertisement *)advertisementWith:(NSDictionary *)dictionary
Parameters
dictionary |
A dictionary of values |
---|
Return Value
A new advertisement
Discussion
Create an advertisement from a dictionary of values
Declared In
XAAdvertisement.h
+ advertisementWithComponents:
Create an advertisement with the supplied ad components.
+ (XAAdvertisement *)advertisementWithComponents:(XAAdComponents *)components
Parameters
components |
An ad components object. |
---|
Return Value
A new advertisement
Discussion
Create an advertisement with the supplied ad components.
Declared In
XAAdvertisement.h
+ advertisementWithTitle:category:impressionTracking:creative:
Create an advertisement with the required components for DAAST.
+ (XAAdvertisement *)advertisementWithTitle:(NSString *)title category:(NSString *)category impressionTracking:(NSArray *)impressionTracking creative:(NSArray *)creatives
Parameters
title |
The title for the advertisement. |
---|---|
category |
The category of the advertisement. |
impressionTracking |
An array or URLs that are used for tracking if an impression was served. |
creatives |
An array of creatives for the advertisement. |
Return Value
A new advertisement
Discussion
Create an advertisement with the required components for DAAST.
Declared In
XAAdvertisement.h
+ advertisementWithTitle:category:impressionTracking:creative:settings:
Create an advertisement with the required components for DAAST as well as a settings object.
+ (XAAdvertisement *)advertisementWithTitle:(NSString *)title category:(NSString *)category impressionTracking:(NSArray *)impressionTracking creative:(NSArray *)creatives settings:(XASettings *)settings
Parameters
title |
The title for the advertisement. |
---|---|
category |
The category of the advertisement. |
impressionTracking |
An array of URLs that are used for tracking if an impression was served. |
creatives |
An array of creatives for the advertisement. |
settings |
A settings object for configuring playback. |
Return Value
A new advertisement
Discussion
Create an advertisement with the required components for DAAST as well as a settings object.
Declared In
XAAdvertisement.h
settings
Settings for the advertisement, used to customize items such as stall thresholds, loading timeouts, display preferences.
@property (nonatomic, retain, readonly) XASettings *settings
Discussion
Settings for the advertisement, used to customize items such as stall thresholds, loading timeouts, display preferences.
Declared In
XAAdvertisement.h
Advertisement Data
requestKey
The request ID associated with the advertisement.
@property (nonatomic, retain, readonly) NSString *requestKey
Discussion
The request ID associated with the advertisement.
Used within XAPP to tie off to the particular request.
Declared In
XAAdvertisement.h
sessionKey
The key associated with the session the advertisement was served within.
@property (nonatomic, retain, readonly) NSString *sessionKey
Discussion
The key associated with the session the advertisement was served within.
Declared In
XAAdvertisement.h
nowPlayingText
Now Playing Text is used for lock screen controls and bluetooth devices
@property (nonatomic, retain, readonly) NSString *nowPlayingText
Discussion
Now Playing Text is used for lock screen controls and bluetooth devices
Declared In
XAAdvertisement.h
userData
User data associated with the advertisement. Currently only used for phone calls where we call the user.
@property (nonatomic, retain) XAUserData *userData
Discussion
User data associated with the advertisement. Currently only used for phone calls where we call the user.
Declared In
XAAdvertisement.h
DAAST Required
adID
The ID associated with the advertisement playback.
@property (nonatomic, retain, readonly) NSString *adID
Declared In
XAAdvertisement.h
adTitle
The name of the advertisement
@property (nonatomic, retain, readonly) NSString *adTitle
Declared In
XAAdvertisement.h
impressionTracking
An array of URLs that are called when the ad has registered an impression.
@property (nonatomic, retain, readonly) NSArray *impressionTracking
Discussion
An array of URLs that are called when the ad has registered an impression.
See ~!@DAAST 3.1.4.1 Required
Declared In
XAAdvertisement.h
linearCreative
The main linear creative for the ad.
@property (nonatomic, retain, readonly) XALinear *linearCreative
Declared In
XAAdvertisement.h
creatives
An array of creative, either companion or linear creative.
@property (nonatomic, retain, readonly) NSArray *creatives
Discussion
An array of creative, either companion or linear creative.
See ~!@DAAST 3.1.4.1 Required
Declared In
XAAdvertisement.h
category
The category for the ad.
@property (nonatomic, retain, readonly) NSString *category
Declared In
XAAdvertisement.h
DAAST Optional
adSystem
The server that returned the advertisement.
@property (nonatomic, retain, readonly) NSString *adSystem
Declared In
XAAdvertisement.h
adDescription
A description for the ad.
@property (nonatomic, retain, readonly) NSString *adDescription
Declared In
XAAdvertisement.h
advertiser
The account for the advertisement
@property (nonatomic, retain, readonly) NSString *advertiser
Declared In
XAAdvertisement.h
complementaryCompanion
The companion for the advertisement that is displayed during playback.
@property (nonatomic, retain, readonly) NSObject<XACompanion,XAComplementaryCompanion> *complementaryCompanion
Discussion
The companion for the advertisement that is displayed during playback.
Declared In
XAAdvertisement.h
leaveBehindCompanion
The companion for the advertisement that is left behind after the ad finishes.
@property (nonatomic, retain, readonly) NSObject<XACompanion,XALeaveBehindCompanion> *leaveBehindCompanion
Discussion
The companion for the advertisement that is left behind after the ad finishes.
Declared In
XAAdvertisement.h
Advertisement Playback
– deviceCanPlay:
Check if the device has the necessary capabilities to play the ad properly.
- (BOOL)deviceCanPlay:(NSError **)error
Parameters
error |
Reference to an error whereas if the ad cannot be played, the error will be initialized with the appropriate error |
---|
Return Value
BOOL if the ad can be played on the current device
Discussion
Check if the device has the necessary capabilities to play the ad properly.
Declared In
XAAdvertisement.h