FBAdSettings
这个类有新版本。查看 最新版本。

AdSettings contains global settings for all ad controls.

Superclass:NSObject
Declared in:FBAdSettings.h
类方法
addTestDevice:

Adds a test device.

参数描述
deviceHash

The id of the device to use test mode, can be obtained from debug log or testDeviceHash

+ (void) addTestDevice:(NSString *)deviceHash;
Discussion:

Copy the current device Id from debug log and add it as a test device to get test ads. Apps running on emulator will automatically get test ads. Test devices should be added before loadAd is called.

声明语言: FBAdSettings.h
addTestDevices:

Add a collection of test devices. See +addTestDevices: for details.

参数描述
devicesHash

The array of the device id to use test mode, can be obtained from debug log or testDeviceHash

+ (void) addTestDevices:(FB_NSArrayOf(NSString *)*)devicesHash;
声明语言: FBAdSettings.h
clearTestDevice:

Clears the added test device

参数描述
deviceHash

The id of the device using test mode, can be obtained from debug log or testDeviceHash

+ (void) clearTestDevice:(NSString *)deviceHash;
声明语言: FBAdSettings.h
clearTestDevices

Clear all the added test devices

+ (void) clearTestDevices;
声明语言: FBAdSettings.h
getLogLevel

Gets the current SDK logging level

+ (FBAdLogLevel) getLogLevel;
声明语言: FBAdSettings.h
isTestMode

Returns test mode on/off.

+ (BOOL) isTestMode;
声明语言: FBAdSettings.h
setIsChildDirected:

Configures the ad control for treatment as child-directed.

参数描述
isChildDirected

Indicates whether you would like your ad control to be treated as child-directed

+ (void) setIsChildDirected:(BOOL)isChildDirected;
Discussion:

Note that you may have other legal obligations under the Children's Online Privacy Protection Act (COPPA). Please review the FTC's guidance and consult with your own legal counsel.

声明语言: FBAdSettings.h
setLogLevel:

Sets the current SDK logging level

+ (void) setLogLevel:(FBAdLogLevel)level;
声明语言: FBAdSettings.h
setMediationService:

If an ad provided service is mediating Audience Network in their sdk, it is required to set the name of the mediation service

参数描述
service

Representing the name of the mediation that is mediation Audience Network

+ (void) setMediationService:(NSString *)service;
声明语言: FBAdSettings.h
setUrlPrefix:

Sets the url prefix to use when making ad requests.

+ (void) setUrlPrefix:(NSString *)urlPrefix;
Discussion:

This method should never be used in production.

声明语言: FBAdSettings.h
testDeviceHash

Returns the hashid of the device to use test mode on.

+ (NSString *) testDeviceHash;
声明语言: FBAdSettings.h
urlPrefix

Gets the url prefix to use when making ad requests.

+ (NSString *) urlPrefix;
Discussion:

This method should never be used in production.

声明语言: FBAdSettings.h