Provides all available methods for displaying ads. More...
#import <FlurryAds.h>
Inherits NSObject.
Class Methods | |
(void) | + fetchAdForSpace:frame:size: |
Retrieves an ad for the given space . More... | |
(BOOL) | + adReadyForSpace: |
Returns if an ad is currently ready to display for a given space . More... | |
(void) | + displayAdForSpace:onView:viewControllerForPresentation: |
Display an ad for the given space . More... | |
(void) | + displayAdForSpace:modallyForViewController: |
[Deprecated] Display an ad for the given interstitial space . More... | |
(void) | + fetchAndDisplayAdForSpace:view:viewController:size: |
Fetch and Display an ad for the given space . More... | |
(void) | + removeAdFromSpace: |
Removes an ad for the given space . More... | |
(void) | + initialize: |
Initializes the ad serving system. More... | |
(void) | + setAdDelegate: |
Sets the object to receive various delegate methods. More... | |
(void) | + enableTestAds: |
Informs server to send test ads. More... | |
(void) | + setUserCookies: |
Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when a user clicks on an ad. More... | |
(void) | + clearUserCookies |
Removes a previously set dictionary of key/value pairs. More... | |
(void) | + setKeywordsForTargeting: |
Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when an ad is requested. More... | |
(void) | + clearKeywords |
Removes a previously set dictionary of key/value pairs. More... | |
(void) | + addCustomAdNetwork:withProperties: |
Method to add a custom ad network to be served through the standard Flurry ad system. More... | |
Provides all available methods for displaying ads.
Set of methods that allow publishers to configure, target, and deliver ads to their customers.
Definition at line 33 of file FlurryAds.h.
+ (void) addCustomAdNetwork: | (Class< FlurryCustomAdNetwork >) | adNetworkClass | |
withProperties: | (id< FlurryCustomAdNetworkProperties >) | adNetworkProperties | |
+ (BOOL) adReadyForSpace: | (NSString *) | space |
Returns if an ad is currently ready to display for a given space
.
This method will verify if there is an ad is currently available for this user. If an ad is not available, you may call #fetchAdForSpace:view:size: to load a new ad.
space
simply represents the placement of the ad in your app and should be unique for each placement. For example, if you are displaying a full screen ad on your splash screen and after level completeion, you may have the following spaces "SPLASH_AD" and @c @"LEVEL_AD"
.space | The placement of an ad in your app, where placement may be splash screen for SPLASH_AD. |
+ (void) clearKeywords |
Removes a previously set dictionary of key/value pairs.
This method removes information from the one keywords object.
+ (void) clearUserCookies |
Removes a previously set dictionary of key/value pairs.
This method removes information from the one UserCookie object.
+ (void) displayAdForSpace: | (NSString *) | space |
[Deprecated] Display an ad for the given interstitial space
.
This method will display an interstitial ad if one is ready for display on the device for specified UIViewController instance [Deprecated] displayAdForSpace:onView:viewControllerForPresentation: is the preferred routine for showing interstitials.
space
simply represents the placement of the ad in your app and should be unique for each placement. Only one ad will show at a time for any given ad space. For example, if you are displaying a full screen ad on your splash screen and after level completeion, you may have the following spaces "SPLASH_AD" and @c @"LEVEL_AD"
.space | The placement of an ad in your app, where placement may |
viewController | The viewController to show the fullscreen ad modally. Note this method should not be used for banners. |
+ (void) displayAdForSpace: | (NSString *) | space | |
onView: | (UIView *) | view | |
viewControllerForPresentation: | (UIViewController *) | viewControllerForPresentation | |
Display an ad for the given space
.
This method will display an ad if one is ready for display on the device.
space
simply represents the placement of the ad in your app and should be unique for each placement. Only one ad will show at a time for any given ad space. For example, if you are displaying a full screen ad on your splash screen and after level completeion, you may have the following spaces "SPLASH_AD" and @c @"LEVEL_AD"
.space | The placement of an ad in your app, where placement may |
view | The view to place the ad. The view frame should be identical to the view frame passed in #fetchAdForSpace:frame:size. Note view is not used for interstitials. |
viewControllerForPresentation | The viewController to show the fullscreen ad modally. be splash screen for SPLASH_AD. |
+ (void) enableTestAds: | (BOOL) | enable |
Informs server to send test ads.
This method allows you to request test ads from the server. These ads do not generate revenue so it is CRITICAL this call is removed prior to app submission.
enable | YES to receive test ads to the device. Not including this method is equivalent to passing NO. |
+ (void) fetchAdForSpace: | (NSString *) | space | |
frame: | (CGRect) | frame | |
size: | (FlurryAdSize) | size | |
Retrieves an ad for the given space
.
This method will attempt to retrieve ads for the given space from the Flurry server.
space
simply represents the placement of the ad in your app and should be unique for each placement. For example, if you are displaying a full screen ad on your splash screen and after level completeion, you may have the following spaces "SPLASH_AD" and @c @"LEVEL_AD"
.space | The placement of an ad in your app, where placement may be splash screen for SPLASH_AD. |
frame | The frame of the view that will be used for the ad container. |
size | The default size of an ad space. This can be overriden on the server. See FlurryAdSize in the FlurryAds.h file for allowable values. |
+ (void) fetchAndDisplayAdForSpace: | (NSString *) | space | |
view: | (UIView *) | viewContainer | |
viewController: | (UIViewController *) | viewControllerForPresentation | |
size: | (FlurryAdSize) | size | |
Fetch and Display an ad for the given space
.
This method will display an ad if one is available from the Flurry server for this user.
timeout
. space
simply represents the placement of the ad in your app and should be unique for each placement. Only one ad will show at a time for any given ad space. For example, if you are displaying a full screen ad on your splash screen and after level completeion, you may have the following spaces "SPLASH_AD" and @c @"LEVEL_AD"
.space | The placement of an ad in your app, where placement may be splash screen for SPLASH_AD. |
view | The UIView in your app that the ad will be placed as a subview. Note: for fullscreen ads, this view is not used as a container, but the size of the view may still be used for determining what types of ads will fit in this space. |
size | The default size of an ad space. This can be overriden on the server. See FlurryAdSize in the FlurryAds.h file for allowable values. |
+ (void) initialize: | (UIViewController *) | rvc |
Initializes the ad serving system.
This method initializes the ad serving system and can be used to pre-cache ads from the server (this is done when ad spaces are configured on the server).
rvc | The primary root view controller of your app. |
+ (void) removeAdFromSpace: | (NSString *) | space |
Removes an ad for the given space
.
This method will remove an ad if one is currently displaying.
space
simply represents the placement of the ad in your app and should be unique for each placement. Only one ad will show at a time for any given ad space.space | The placement of an ad in your app, where placement may be splash screen for SPLASH_AD. |
+ (void) setAdDelegate: | (id) | delegate |
Sets the object to receive various delegate methods.
This method allows you to register an object that will receive notifications at different phases of ad serving.
delegate | The object to receive notifications of various ad actions. |
+ (void) setKeywordsForTargeting: | (NSDictionary *) | keywords |
Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when an ad is requested.
Keywords allow the developer to specify information on a user executing an ad action for the purposes of targeting. There is one keywords object that is transmitted to the Flurry servers on each ad request. If corresponding keywords are matched on the ad server, a subset of targeted ads will be delivered. This allows partners to supply information they track internally, which is not available to Flurry's targeting system.
keywords | The information about the user to be used in targeting an ad. Note: do not transmit personally identifiable information in keywords. |
+ (void) setUserCookies: | (NSDictionary *) | userCookies |
Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when a user clicks on an ad.
UserCookies allow the developer to specify information on a user executing an ad action. There is one UserCookie object, and on each ad click that UserCookie is transmitted to the Flurry servers. The UserCookie key/value pairs will be transmitted back to the developer via the app callback if one is set. This is useful for rewarded inventory, to identify which of your users should be rewarded when a reward callback is sent.
userCookies | The information about the user executing ad actions. Note: do not transmit personally identifiable information in the user cookies. |