GDPR
一般信息
《通用数据保护条例》(GDPR) 于 2018 年春季生效。 GDPR 规定了如何收集和处理有关欧洲经济区和瑞士公民的信息。 其目的是保护机密数据的隐私,并确保与互联网上信息收集、存储和处理相关的所有流程的透明度。
GDPR 具有治外法权范围,适用于处理欧洲经济区和瑞士公民个人数据的所有公司,无论该公司位于何处。
快速指南
每次应用启动时,必须将用户对其个人数据处理的同意传递给 SDK。
-
按照这些步骤连接 Mobile Ads SDK。
-
显示一个窗口,用户可以在其中接受个人数据处理的用户协议(详情请参见 示例)。
此代码是一个示例,而不是要遵循的分步指南。
// ... // 创建对话框窗口的示例。 func showGDPRDialog() { let alertController = UIAlertController( title: title, message: message, preferredStyle: .actionSheet) let acceptAction = UIAlertAction( title: "Accept", style: .default) { _ in self.setUserConsent(true) } alertController.addAction(acceptAction) let declineAction = UIAlertAction( title: "Decline", style: .default) { _ in self.setUserConsent(false) } alertController.addAction(declineAction) let openPrivacyPolicyAction = UIAlertAction( title: "View privacy policy", style: .default) { _ in UIApplication.shared.openURL(self.privacyPolicyURL) } alertController.addAction(openPrivacyPolicyAction) present(alertController, animated: true) } func setUserConsent(_ userConsent: Bool) { UserDefaults.standard.set(userConsent, forKey: kGDPRUserConsentKey) } func initializeAdsSDK() { let userConsent = UserDefaults.standard.bool(forKey: kGDPRUserConsentKey) YandexAds.setUserConsent(userConsent) } -
使用
YandexAds.setUserConsent(_:)方法将接收到的值传递至 Mobile Ads SDK。 从适用 GDPR 国家/地区的用户收集的数据仅在用户同意的情况下进行处理。
这篇文章是否有用?
上一篇
下一篇