if(permision.isIOS) {
//idfa標識
console.log('xxxxxxxxxxxxxxxxxxx')
plus.runtime.argeePrivacy();
}
- 发布:2026-01-28 16:39
- 更新:2026-01-28 17:05
- 阅读:24
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 4.87
手机系统: iOS
手机系统版本号: iOS 18
手机厂商: 苹果
手机机型: iphone 11
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
https://uniapp.dcloud.net.cn/tutorial/app-ios-idfa.html#privacyregistermode 按照文档配置后,在同意隐私框后执行plus.runtime.argeePrivacy
https://uniapp.dcloud.net.cn/tutorial/app-ios-idfa.html#privacyregistermode 按照文档配置后,在同意隐私框后执行plus.runtime.argeePrivacy
预期结果:
成功请求权限
成功请求权限
实际结果:
报错
[Vue warn]: Error in v-on handler (Promise/async): "TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined)"
16:34:12.181 (found at pages/index/index.vue:1)
16:34:12.181 TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined)
报错
[Vue warn]: Error in v-on handler (Promise/async): "TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined)"
16:34:12.181 (found at pages/index/index.vue:1)
16:34:12.181 TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined)
bug描述:
https://uniapp.dcloud.net.cn/tutorial/app-ios-idfa.html#privacyregistermode 按照文档配置后,在同意隐私框后执行plus.runtime.argeePrivacy 报错, [Vue warn]: Error in v-on handler (Promise/async): "TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined)"
16:34:12.181 (found at pages/index/index.vue:1)
16:34:12.181 TypeError: plus.runtime.argeePrivacy is not a function. (In 'plus.runtime.argeePrivacy()', 'plus.runtime.argeePrivacy' is undefined),不配置"privacyRegisterMode": "manual",也不会默认请求权限
3 个回复
Ask小助手
您好,感谢反馈!
根据官方文档及知识库确认,您遇到的报错是因为 API 名称拼写错误 导致的:
plus.runtime.agreePrivacy()(注意是 agree,不是 argee)。plus.runtime.argeePrivacy(),因此会提示is not a function。✅ 正确用法示例:
⚠️ 其他注意事项(请一并检查):
"app-plus" > "distribute" > "ios" > "privacyRegisterMode": "manual"? 建议操作步骤:
plus.runtime.agreePrivacy();"privacyRegisterMode": "manual";plus.runtime.isAgreePrivacy()判断状态。如仍有问题,欢迎提供打包方式(云端/自定义基座)及最小复现 demo,我们将进一步协助您排查。
哈哈6 (作者)
请检查文档根据文档上写的。。。plus.runtime.argeePrivacy()
DCloud_UNI_yuhe
哪个文档写的 argeePrivacy ? https://www.html5plus.org/doc/zh_cn/runtime.html#plus.runtime.agreePrivacy
2026-01-28 16:56
哈哈6 (作者)
回复 DCloud_UNI_yuhe: https://uniapp.dcloud.net.cn/tutorial/app-ios-idfa.html#privacyregistermode
2026-01-28 17:04
DCloud_UNI_yuhe
回复 哈哈6: 我改了一下问题, 你使用 agreePrivacy 试一下
2026-01-28 17:26
哈哈6 (作者)
文档截图
要回复问题请先登录或注册
公告
更多>相关问题