配置权限信息多语言在uni-app中有Bug
配置权限信息多语言在uni-app中有Bug
信息类别 | 详细信息 |
---|---|
产品分类 | uniapp/App |
PC开发环境操作系统 | Mac |
PC开发环境操作系统版本号 | Sequoia15.4.1 |
手机系统 | iOS |
手机系统版本号 | iOS 15 |
手机厂商 | 苹果 |
手机机型 | 13pro |
页面类型 | vue |
vue版本 | vue3 |
打包方式 | 云端 |
项目创建方式 | CLI |
CLI版本号 | xxx |
操作步骤:
locales: {
en: {
name: "Amerilink",
ios: {
privacyDescripion: {
NSUserTrackingUsageDescription:
"Please rest assured that enabling this permission will not access your private information on other sites. This permission is only used to identify the device and ensure service security for an improved browsing experience",
},
},
},
zh: {
name: "Amerilink",
ios: {
privacyDescripion: {
NSUserTrackingUsageDescription:
"请放心,开启权限不会获取您在其他站点的隐私信息,该权限仅用欲标识设备并保障服务安全于提示浏览体验。",
},
},
},
},
预期结果:
期望:能在不同语言的手机环境下显示不同的语言
实际结果:
还是会显示中午呢
bug描述:
ios 出海提审的情况下 配置了一下配置
locales: {
en: {
name: "Amerilink",
ios: {
privacyDescripion: {
NSUserTrackingUsageDescription:
"Please rest assured that enabling this permission will not access your private information on other sites. This permission is only used to identify the device and ensure service security for an improved browsing experience",
},
},
},
zh: {
name: "Amerilink",
ios: {
privacyDescripion: {
NSUserTrackingUsageDescription:
"请放心,开启权限不会获取您在其他站点的隐私信息,该权限仅用欲标识设备并保障服务安全于提示浏览体验。",
},
},
},
},
手机切换到英文, 在标注基座下:提示显示中文。 在自定义基座下:不显示提示信息。 所以在审核的时候,我不知道这么测试是否正确的。
期望:能在不同语言的手机环境下显示不同的语言
更多关于配置权限信息多语言在uni-app中有Bug的实战教程也可以访问 https://www.itying.com/category-93-b0.html
最新的配置:
“locales”: {
“en”: {
“name”: “Amerilink”,
“ios”: {
“privacyDescripion”: {
“NSLocationAlwaysAndWhenInUseUsageDescription”: “To provide accurate location services both when you are using the app (such as searching for nearby hotels, planning trips) and when the app is running in the background (such as continuous trip monitoring, smart recommendation updates), this permission is required. Location information will only be used to enhance your service experience.”,
“NSLocationWhenInUseUsageDescription”: “To provide you with accurate nearby hotel recommendations, trip navigation, and other services, we need to access your location. It will only be obtained when using relevant features and won’t be tracked in the background.”,
“NSLocationAlwaysUsageDescription”: “To enable features like continuous hotel location updates during your trip and automatic check - in in the background, we need to access your location information while the app is running in the background. Your privacy will be strictly protected.”
}
}
},
“zh”: {
“name”: “Amerilink”,
“ios”: {
“privacyDescripion”: {
“NSLocationAlwaysAndWhenInUseUsageDescription”: “为在您使用应用(如查询附近酒店、规划行程)及应用后台运行(如持续行程监测、智能推荐更新 )时,都能提供精准位置服务,需获取此权限,位置信息仅用于提升服务体验。”,
“NSLocationWhenInUseUsageDescription”: “为向您提供精准的周边酒店推荐、行程导航等服务,需获取您的位置信息,仅在使用相关功能时获取,不会在后台持续追踪。”,
“NSLocationAlwaysUsageDescription”: “为实现如行程中持续的酒店位置更新、后台自动签到打卡等功能,需在后台获取您的位置信息,我们会严格保护您的隐私。”
}
}
}
},
这个是表现。
请上传复现此问题ipa安装包
在 uni-app 中配置 iOS 权限信息的多语言时,需要注意几个关键点。你遇到的问题可能源于配置方式或系统识别机制。
首先,检查 manifest.json
中的 locales
配置是否位于正确位置。它应直接嵌套在 app-plus
→ distribute
→ ios
下,例如:
"app-plus": {
"distribute": {
"ios": {
"locales": {
"en": {
"NSUserTrackingUsageDescription": "Your English description"
},
"zh": {
"NSUserTrackingUsageDescription": "您的中文描述"
}
}
}
}
}