OOPulse
Objective-C
@interface OOPulse : NSObject
Swift
class OOPulse : NSObject
The Ooyala Pulse SDK.
This class is used to request ad sessions from Ooyala Pulse. An ad session contains all the ads that will be played along with a specific piece of content.
When your application has content which it wants to display alongside advertisements,
it requests a new ad session using this class. (See OOPulseSession
.)
-
Initialize the Pulse SDK.
This method must be called before requesting any ad sessions.
Declaration
Objective-C
+ (void)setPulseHost:(NSString *)host deviceContainer:(NSString *)deviceContainer persistentId:(NSString *)persistentId;
Swift
class func setPulseHost(_ host: String!, deviceContainer: String!, persistentId: String!)
Parameters
host
The Ooyala Pulse hostname for the client account being used.
deviceContainer
The Ooyala Pulse device container, if any; can be nil.
persistentId
The Ooyala Pulse persistent user id, if any; can be nil.
-
Set a listener to receive low-level log messages about errors, warnings and the like, which may be dispatched during ad or tracking requests.
Declaration
Objective-C
+ (void)setLogListener:(OOLogListenerBlock)listener;
Swift
class func setLogListener(_ listener: OOLogListenerBlock!)
Parameters
listener
A
OOLogListenerBlock
which is called with the log messages. -
Create a new Pulse ad session with the passed metadata and request settings.
Declaration
Objective-C
+ (id<OOPulseSession>) sessionWithContentMetadata:(OOContentMetadata *)contentMetadata requestSettings:(OORequestSettings *)requestSettings;
Swift
class func session(with contentMetadata: OOContentMetadata!, requestSettings: OORequestSettings!) -> (any OOPulseSession)!
Parameters
contentMetadata
Information about the content along with which the requested ads are to be displayed.
requestSettings
Information about the environment in which the ad will play.
Return Value
An object conforming to the
OOPulseSession
protocol. -
Set whether or not debug information from the SDK should be logged to the console.
Declaration
Objective-C
+ (void)logDebugMessages:(BOOL)value;
Swift
class func logDebugMessages(_ value: Bool)
Parameters
value
YES if debug messages should be logged; NO otherwise.
-
Method that requests the status of the debug messages logging inside the Pulse framework.
Declaration
Objective-C
+ (BOOL)isDebugLoggingEnabled;
Swift
class func isDebugLoggingEnabled() -> Bool
Return Value
YES if debug messages are enabled; NO otherwise.