<FWAdManager > Protocol Reference

Protocol for AdManager. More...

#import <FWProtocols.h>

+ Inheritance diagram for <FWAdManager >:

Instance Methods

(void) - setCurrentViewController:
 Set application's current view controller. More...
 
(void) - setServerUrl:
 Set the ad server URL provided by FreeWheel. More...
 
(void) - setNetworkId:
 Set the network ID of the distributor. More...
 
(void) - setLocation:
 Set the current location of the device. More...
 
(NSUInteger) - version
 Get major version of AdManager. More...
 
(id< FWContext >) - newContext
 Create a new FWContext instance A FWContext instance is used to set ad request information for a particular ad or ad set. More...
 
(id< FWContext >) - newContextWithContext:
 Create a new context from the given context. More...
 
(void) - disableFWCrashReporter
 Disable FreeWheel crash reporter. More...
 

Detailed Description

Protocol for AdManager.

Use newAdManager() to create a new id<FWAdManager> instance

Method Documentation

- (void FWAdManager) disableFWCrashReporter

Disable FreeWheel crash reporter.

By default AdManager will send a crash report to ad server when an app crash is detected.

- (id<FWContext> FWAdManager) newContext

Create a new FWContext instance A FWContext instance is used to set ad request information for a particular ad or ad set.

Multiple contexts can be created throughout the lifecycle of the FreeWheel AdManager and may exist simultaneously without consequence. Multiple simultaneous contexts are useful to optimize user experience in the network-resource limited environment.

Returns
an id<FWContext>
- (id<FWContext> FWAdManager) newContextWithContext: (id< FWContext >)  context

Create a new context from the given context.

The new context copies internal state and information of the old one, so you can use this method to create an identical context without having to set all the information again.

The following methods are called automatically on the new context with values of the old one.

  • -[FWContext setRequestMode:]
  • -[FWContext setCapability:status:]
  • -[FWContext setVisitorId:ipV4Address:bandwidth:bandwidthSource:]
  • -[FWContext setVisitorHTTPHeader:withValue:]
  • -[FWContext setSiteSectionId:idType:pageViewRandom:networkId:fallbackId:]
  • -[FWContext setVideoAssetId:idType:duration:durationType:location:autoPlayType:videoPlayRandom:networkId:fallbackId:]
  • -[FWContext setPlayerProfile:defaultTemporalSlotProfile:defaultVideoPlayerSlotProfile:defaultSiteSectionSlotProfile:]
  • -[FWContext startSubsessionWithToken:]
  • -[FWContext setRequestDuration:]
  • -[FWContext setVideoDisplayCompatibleSizes:]
  • -[FWContext setVideoState:]

You are required to call the following methods again on the new context:

  • -[NSNotificationCenter addObserver:selector:name:object:] (add notification observer for the new context)
  • -[FWContext addTemporalSlot:adUnit:timePosition:slotProfile:cuePointSequence:minDuration:maxDuration:acceptPrimaryContentType:acceptContentType:] (if there's any)
  • -[FWContext addSiteSectionNonTemporalSlot:adUnit:width:height:slotProfile:acceptCompanion:initialAdOption:acceptPrimaryContentType:acceptContentType:compatibleDimensions:] (if there's any)
  • -[FWContext addVideoPlayerNonTemporalSlot:adUnit:width:height:slotProfile:acceptCompanion:initialAdOption:acceptPrimaryContentType:acceptContentType:compatibleDimensions:] (if there's any)
  • -[FWContext submitRequestWithTimeout:]
- (void FWAdManager) setCurrentViewController: (UIViewController *)  value

Set application's current view controller.

Required if using FWAdMobRenderer or FWMillennialDisplayAdRenderer or FWMillennialTakeoverAdRenderer. Once set, the view controller set will be retained by AdManager.

Parameters
valuecurrent view controller
- (void FWAdManager) setLocation: (CLLocation *)  value

Set the current location of the device.

This value will only be used for geo targeting purposes.

Parameters
valuedevice's current location, CLLocation. nil by default.
- (void FWAdManager) setNetworkId: (NSUInteger)  value

Set the network ID of the distributor.

REQUIRED. Consult your FreeWheel sales engineer for the value.

Parameters
valuenetwork ID of the distributor
- (void FWAdManager) setServerUrl: (NSString *)  value

Set the ad server URL provided by FreeWheel.

REQUIRED. Consult your FreeWheel sales engineer for the value.

Parameters
valueurl of the FreeWheel Ad Server
- (NSUInteger FWAdManager) version

Get major version of AdManager.

Returns
version of AdManager, e.g. 0x02060000 for v2.6

The documentation for this protocol was generated from the following file: