高级设置

请先查看文档basic integration,然后根据您的需求集成所需要的广告格式(interstitial or rewarded adsbanner adsMREC ads)。该文档包含了集成文档的补充内容,请务必先完成基础集成文档流程。

Apple’s App Store Privacy 相关问题

Apple发布了针对App Store上架的隐私相关要求。根据苹果公司的声明,开发者应该声明哪些数据是其应用或SDK收集的。

为了帮助您回答关于Vungle SDK相关问题,请查看下表中的数据。

免责声明:

  • This list is only applicable to Apple privacy questionnaire, and it does not address data or privacy questions that may be raised by other parties. Please always refer to the Vungle Privacy Policy for more detailed information.
  • This list only describes Vungle’s SDK and data collection. This list does not describe a developer’s overall app data collection and use, or that of any other SDK.
Category/Data Collected? Used for tracking? Purpose

Contact info

 

 

 

Name

No

N/A

N/A

Email Address

No

N/A

N/A

Phone Number

No

N/A

N/A

Physical Address

No

N/A

N/A

Other User Contact Info

No

N/A

N/A

Health and Fitness

 

 

 

Health

No

N/A

N/A

Fitness

No

N/A

N/A

Financial Info

 

 

 

Payment Info

No

N/A

N/A

Credit Info

No

N/A

N/A

Other Financial Info

No

N/A

N/A

Location

 

 

 

Precise Location

No

N/A

N/A

Coarse Location

Yes

Yes

Third-party advertising and analytics

Sensitive Info

 

 

 

Sensitive Info

No

N/A

N/A

Contacts

 

 

 

Contacts

No

N/A

N/A

User Content

 

 

 

Emails or Text Messages

No

N/A

N/A

Photos or Videos

No

N/A

N/A

Audio Data

No

N/A

N/A

Gameplay Content

No

N/A

N/A

Customer Support

No

N/A

N/A

Other User Content

No

N/A

N/A

Browsing History

 

 

 

Browsing History

No

N/A

N/A

Search History

 

 

 

Search History

No

N/A

N/A

Identifiers

 

 

 

User ID

No

N/A

N/A

Device ID

Yes

Yes

Third-party advertising and analytics

Purchases

 

 

 

Purchase History

No

N/A

N/A

Usage Data

 

 

 

Product Interaction

Yes

No

Third-party advertising and analytics

Advertising Data

Yes

Yes

Third-party advertising and analytics

Other Usage Data

No

N/A

N/A

Diagnostics

 

 

 

Crash Data

No

N/A

N/A

Performance Data

Yes

No

Third-party advertising and analytics

Other Diagnostic Data

No

N/A

N/A

Other Data

 

 

 

Other Data Types

No

N/A

N/A

GDPR 推荐实施方法说明

自2019年5月25日起,通用数据保护条例(GDPR)将在欧盟实施。为了符合GDPR,开发人员有两种选择。

  • 方法一(推荐): 开发者控制GDPR设置的整个流程,然后再将用户的选择传递给Vungle。详情请查看以下示例代码:
  • 选项 2:允许 Vungle 处理相关需求。Vungle 在向欧洲用户播放广告之前会显示征求同意的对话框,并记住用户的同意或拒绝选择,以用于后续的广告。

要使用Vungle API更新或查询用户的同意状态(如选项1中所建议),请对Vungle SDK v6.3.2和更高版本使用以下功能:

Objective-CSwift
// This function sets the consent status that will be recorded in Vungle SDK. Accepted values: 'VungleConsentAccepted' or 'VungleConsentDenied'. It also sets the consent message version. This value is an arbitrary string, and can be used to identify the version of the consent message presented to the user.

// To set the user's consent status to opted in:
[[VungleSDK sharedSDK] updateConsentStatus:VungleConsentAccepted consentMessageVersion:@"Some Consent Message Version"];

// To set the user's consent status to opted out:
[[VungleSDK sharedSDK] updateConsentStatus:VungleConsentDenied consentMessageVersion:@"Some Consent Message Version"];

// To find out what the user's current consent status is: 
// (Check against enum values: 'VungleConsentAccepted' or 'VungleConsentDenied'.)

[[VungleSDK sharedSDK] getCurrentConsentStatus];

// To find out which version of the consent message was shown to the user:
// This method returns an NSString value.
[[VungleSDK sharedSDK] getConsentMessageVersion];

VungleConsentStatus is an enum with two states:

  • VungleConsentAccepted
  • VungleConsentDenied

该 SDK 还有一个初始状态为“未知”,此时会提示用户选择参加或不参加用户数据收集计划。请注意,此提示仅针对欧洲 IP 地址才显示。

由于Vungle SDK v6.2.0无法通过同意消息版本,因此请使用以下API:

// This function sets the consent status that will be recorded in Vungle SDK. Accepted values: 'VungleConsentAccepted' or 'VungleConsentDenied'.
// To set the user's consent status to opted in:
[[VungleSDK sharedSDK] updateConsentStatus:VungleConsentAccepted]

// To set the user's consent status to opted out:
[[VungleSDK sharedSDK] updateConsentStatus:VungleConsentDenied];

// To find out what the user's current consent status is:
// (Check against enum values: 'VungleConsentAccepted' or 'VungleConsentDenied'.)
[[VungleSDK sharedSDK] getCurrentConsentStatus];

CCPA 推荐使用说明

在2020年7月1日之后, California Consumer Privacy Act (CCPA)将开始强制施行。因此请务必升级SDK到iOS SDK 6.7.0来符合CCPA要求。[VungleSDK updateCCPAStatus] 方法来告知Vungle SDK,用户是否允许。OPTED_OUT表示不允许。 .  另外,[VungleSDK getCCPAStatus]方法可以获取当前用户CCPA状态。 

Objective-C
//OPT_IN
[self.sdk updateCCPAStatus:VungleCCPAAccepted];
//OPT_OUT
[self.sdk updateCCPAStatus:VungleCCPADenied];

Restrict Use of IDFV

自从Vungle SDK v6.4.3,您可以禁止Vungle SDK获取IDFV。

示例代码:

[VungleSDK setPublishIDFV:NO];
if (![sdk startWithAppId:appID error:&error]) {
  if (error) {
    NSLog(@"Error encountered starting the VungleSDK: %@", error);
  }
}

接收委托回调

您可以使用VungleSDKDelegate从SDK接收回调。委托中的回调方法将SDK事件通知给应用程序。

您可以使用以下命令附加和分离委托:

Objective-CSwift
// Attach
[[VungleSDK sharedSDK] setDelegate:yourDelegateInstance];
// Detach
[[VungleSDK sharedSDK] setDelegate:nil];

注意:为避免内存泄漏,请记住在不再需要已注册的委托时将其清除。

SDK成功初始化后,将调用以下方法:

- (void)vungleSDKDidInitialize;

当 SDK 即将播放视频广告时,会调用以下方法。此时是暂停游戏、声效和动画等内容的最佳时机。

- (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID;

SDK刚开始播放视频广告时,将调用以下方法:

- (void)vungleDidShowAdForPlacementID:(nullable NSString *)placementID;

当 SDK 即将关闭广告时,会调用以下方法。此时是奖励式用户并恢复游戏、声效和动画等内容的最佳时机。

As of 6.7.0Deprecated
- (void)vungleWillCloseAdForPlacementID:(nonnull NSString *)placementID;

The following method is called when the SDK has closed an ad.

As of 6.7.0Deprecated
- (void)vungleDidCloseAdForPlacementID:(nonnull NSString *)placementID;

当SDK更改了广告可用性状态时,将调用以下方法。该isAdPlayable布尔表示具体的新可玩性placementID 。 (请参阅“ 检查展示位置的广告可用性”部分。)

- (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID error:(nullable NSError *)error;

- (void)vungleTrackClickForPlacementID:(nullable NSString *)placementID;

当用户点击广告时,以下方法将被触发。

- (void)vungleWillLeaveApplicationForPlacementID:(nullable NSString *)placementID;

当用户完成观看广告时,以下方法将被触发。建议在此处奖励用户。

- (void)vungleRewardUserForPlacementID:(nullable NSString *)placementID;

The following method is called when the SDK fails to initialize. If this happens, restart the Vungle SDK.

- (void)vungleSDKFailedToInitializeWithError:(NSError *)error;

当广告在设备中渲染时,以下方法将被触发。

-(void)vungleAdViewedForPlacement:(NSString *)placementID;

Deprecated as of 6.7.0

VungleViewInfo 包括以下属性,用于检查广告播放效果:

Deprecated
/**
Deprecated as of 6.7.0
**/
@interface VungleViewInfo : NSObject
//Represents a BOOL whether or not the video can be considered a completed view.
@property (nonatomic, readonly) NSNumber *completedView;
//The time in seconds that the user watched the video.
@property (nonatomic, readonly) NSNumber *playTime;
//Represents a BOOL whether or not the user clicked the download button.
@property (nonatomic, readonly) NSNumber *didDownload;
@end

Memory Settings

从Vungle SDK v6.4.3开始,如果iPhone的存储空间低于预定义的阈值,则可以阻止SDK下载,请求广告甚至进行初始化。如果发生这种情况,您将收到与以下类似的错误:

Error while starting VungleSDK There is not enough file system size on a device to initialize VungleSDK.

These are the option keys available:

选项键

默认值/类型

说明

vungleMinimumFileSystemSizeForInit

Integer, value in MB, default value is 50

Sets the required minimum available free storage space to allow the SDK to initialize

vungleMinimumFileSystemSizeForAdRequest

Integer, value in MB, default value is 50

Sets the required minimum available free storage space to enable you to request an ad

示例代码:

[[NSUserDefaults standardUserDefaults] setInteger:200 forKey:@"vungleMinimumFileSystemSizeForInit"];
[[NSUserDefaults standardUserDefaults] setInteger:200 forKey:@"vungleMinimumFileSystemSizeForAdRequest"];
//After setting the desired values above, synchronize
[[NSUserDefaults standardUserDefaults] synchronize];

调试

使用此属性可获取SDK信息:

- (NSDictionary *)debugInfo;

Use the following method for the SDK to output logs:

- (void)setLoggingEnabled:(BOOL)enable;

VungleSDKLogger 协议

@protocol VungleSDKLogger 
- (void)vungleSDKLog:(NSString*)message;
@end

VungleSDK单例将日志事件发送到遵循VungleSDKLogger协议的任何附加类。日志事件包含NSString值,该值也将打印到控制台(如果已启用日志记录)。要附加记录器,请使用以下命令:

Objective-CSwift
[[VungleSDK sharedSDK] attachLogger:yourLoggerInstance];

如上所述,从Vungle SDK中清除附加的记录器很重要。要分离记录器,请使用以下命令:

Objective-CSwift
[[VungleSDK sharedSDK] detachLogger:yourLoggerInstance];

检查初始化状态

如果系统资源运行不足或发生过多上下文切换,则操作系统可以终止分配给Vungle SDK的某些资源。为了确保SDK的顺利运行,我们建议在调用SDK API之前检查SDK的初始化状态。在调用任何SDK API之前先调用isInitialized ,如果isInitialized返回NO ,则重新初始化SDK。

if ([self.sdk isInitialized] == NO) {
   [self initVungleSDK];
}

Questions?

Need further assistance, feel free to reach out to us, we’re here to help!

这篇文章有帮助吗?