- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我不明白为什么未显示Google提交的同意书。它说它已成功加载,但随后没有显示。 (我在欧洲,所以我的位置不是问题)。我已经在模拟器和真实设备上进行了尝试,我仅手动选择了12个广告提供商。
这是有问题的代码:
PACConsentInformation.sharedInstance.debugIdentifiers = ["4FDF7D7F-8F56-4E65-8570-103100943386"]
PACConsentInformation.sharedInstance.debugGeography = PACDebugGeography.EEA
PACConsentInformation.sharedInstance.requestConsentInfoUpdate(forPublisherIdentifiers: ["pub-5765803665103285"]){
(_ error: Error?) -> Void in
if let error = error {
// Consent info update failed.
print(error)
} else {
// Consent info update succeeded. The shared PACConsentInformation
// instance has been updated.
if PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.unknown {
guard let privacyUrl = URL(string: "http://www.gdgapps.altervista.org/index.html/gdg-privacy.html"),
let form = PACConsentForm(applicationPrivacyPolicyURL: privacyUrl) else {
print("incorrect privacy URL.")
return
}
form.shouldOfferPersonalizedAds = true
form.shouldOfferNonPersonalizedAds = true
form.shouldOfferAdFree = true
form.load {(_ error: Error?) -> Void in
print("Load complete.")
if let error = error {
// Handle error.
print("Error loading form: \(error.localizedDescription)")
} else {
print("Load successful.")
}
}
form.present(from: self) { (error, userPrefersAdFree) in
if error != nil {
// Handle error.
} else if userPrefersAdFree {
// User prefers to use a paid version of the app.
//TODO: buy pro version
} else {
// Check the user's consent choice.
let status = PACConsentInformation.sharedInstance.consentStatus
// TODO: show ads
}
}
} else if PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.nonPersonalized || PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.personalized{
print("ads")
self.bannerView.isHidden = false
self.tableBasso.constant = 50
self.bannerView.adUnitID = "ca-app-pub-5765803665103285/9440944250"
self.bannerView.rootViewController = self
let request = GADRequest()
if PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.nonPersonalized {
let extras = GADExtras()
extras.additionalParameters = ["npa": "1"]
request.register(extras)
}
self.bannerView.load(request)
}
}
}
}
最佳答案
加载后,应显示形式。将form.present
放入form.load
的完成块中。
form.load { [weak self] error in
print("Load complete.")
if let error = error {
print("Error loading form: \(error.localizedDescription)")
} else {
guard let strongSelf = self else { return }
form.present(from: strongSelf) { error, userPrefersAdFree in
[...]
}
}
}
关于ios - AdMob同意书未显示吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51427003/
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
我编写了简单的 Java 应用程序供自己使用,它扫描 Excel 文档并从中提取一些事件。对于下一阶段,我希望它登录我的 Google 帐户并使用 Google Calendar API 创建这些事件
我有一个带有链接标记的复选框。单击链接标签时,我的模式打开。单击按钮然后选中复选框时我有模式 I agree with "Terms a
Consent SDK允许显示同意书,但目前只有英文版本(SDK 版本 1.0.3)。 SDK页面说: To update consent text of the Google-rendered co
您好,我需要一些关于如何应用丝潮cookie同意脚本的帮助http://silktide.com/cookieconsent/code 。 (由于欧盟 cookie 法等原因,我想对此进行广告)。现在
我收到了一封来自 Goolge 的关于在我的网站上实现 cookie 许可的电子邮件。我在 Play 商店中只发布了一个 Android 应用程序。它使用广告获利。有必要实现 cookie 同意消息吗
我正在尝试从 Youtube channel 检索 Youtube 视频列表,例如“https://www.youtube.com/user/YouTube/videos”,以获取第 n 个视频(感谢
我想抓取(使用 rvest )一个要求用户同意设置 cookie 的网站。如果我只是抓取页面,则 rvest 只会下载弹出窗口。这是代码: library(rvest) content % html_
我有一个 HTML 网站,我想向其中添加 Cookie-Consent。 类似于 Stackoverflow:Stackoverflow Screenshot 将会出现可能包含屏幕截图中所示链接的文本
我正在尝试将字符串与字符串向量匹配: a <- c('abcde', 'abcdf', 'abcdg') agrep('abcdh', a, max.distance=list(substitutio
我目前正在尝试集成 Google Consent SDK。onConsentInfoUpdated(consentStatus:ConsentStatus) 函数发生了一些我无法理解的事情 用户第一次
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭去年。 Im
我们在 Azure AD 中有一个使用 Microsoft Graph API 的应用。该应用程序使用 4 个基本权限成功运行:电子邮件、个人资料 User.Read User.ReadBasic.A
我们在 Azure AD 中有一个使用 Microsoft Graph API 的应用。该应用程序使用 4 个基本权限成功运行:电子邮件、个人资料 User.Read User.ReadBasic.A
此代码中未使用变量“status”。因此我无法检查用户的同意选择。 我必须将“状态数组”存储在默认值中。一旦当前状态在数组中可用,它将不会显示同意书。如果没有,那么我们将显示表单并将该状态添加到默认状
这是一个例子: 具体的实现可能有一些特定的行为,比如 ArrayList 的实现有 ensureCapacity(),它不适用于 LinkedList。 //programming to interf
我在一个网站上工作,我们目前有一个 cookie 横幅,它在启动时显示并有一个确定按钮。然而,我想改变这一点,让用户可以选择打开/关闭他们希望被跟踪的 cookie 类别。像这样: 我是 reactj
我正在使用 Mac OS X 10.9.5 和 git 版本 2.1.2。进入 推我收到: 同意 Xcode/iOS 许可证需要管理员权限,请通过 sudo 以 root 身份重新运行。 致命:无法从
搜索似乎只能找到使用 JavaScript 的解决方案。我想显示一个 Cookie 同意消息,即使访问者使用脚本拦截器也能看到它,所以我想知道这是否可以使用 CSS 和 HTML 来完成,而不需要任何
fun sample(list_of_str_lists, s) = case list_of_str_lists of [] => [] | x::[]
我是一名优秀的程序员,十分优秀!