本地化系统生成的隐私警报消息iOS UIAlertView Xcode [英] Localizing system generated privacy alert message iOS UIAlertView Xcode

查看:64
本文介绍了本地化系统生成的隐私警报消息iOS UIAlertView Xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Xcode Swift 1.1 开发一个应用程序,并且正在使用 iOS 7.1 和 iOS 8.1 模拟器对其进行测试.

I have an app in development using Xcode Swift 1.1 and am testing it using iOS 7.1 and iOS 8.1 simulators.

该应用程序允许用户访问其照片库,但在此之前,iOS会以英语显示隐私警报消息标题,以征求用户的许可-"应用程序名称"会来访问您的照片.(注意:调用PHAsset和/或ALAssetsLibrary时会触发警报.)

The app allows users to access their photos library, but before they can, iOS displays the Privacy alert message title asking for the user's permission in English language - "App Name" Would Like to Access Your Photos. (Side note: the alert is triggered when calling PHAsset and/or ALAssetsLibrary.)

我的应用程序将以几种不同的语言提供,例如中文.但是,每当我尝试本地化或测试不同的语言设置时,以上隐私警报消息始终以英语显示.我希望系统隐私警报消息以用户设备上设置的语言显示.

My app will be available in a few different languages, for example, Chinese. However whenever I try to localize or test for different languages settings, the above privacy alert message always shows in English. I want the system privacy alert message to display in the language as set on the user's device.

我在Xcode中尝试了多种不同的位置设置和本地化语言,但在模拟器上没有任何区别.

I’ve tried a number of different location settings and localization languages in Xcode with no difference in the simulator.

我希望(或放松休息)在真实设备上设置其他位置会导致iOS为所有系统生成的隐私警报消息自动显示正确的语言吗?

Should I expect (or rest easy) that setting a different location on a real device will have iOS automatically show the correct language for all system generated privacy alert messages?

本地化系统隐私警报消息时我缺少什么?

What am I missing in localizing the system privacy alert messages?

(注意:我尚无法在真实设备上进行测试,并且在Info.plist中设置隐私-图片库使用说明"键不会更改隐私"警报消息标题,但会设置警报的可选描述代替.)

(Note: I am unable to test on a real device yet and that setting the "Privacy - Photo Library Usage Description" key in Info.plist does not change the Privacy alert message title, but sets an optional description for the alert instead.)

推荐答案

...想要访问您的照片权限警报由系统而不是由应用程序显示.因此,它的本地化是由系统而不是您的应用程序的代码完成的.您不必提供翻译字符串.

The ... would like to access your photos permission alert is shown by the system and not by your app. Therefore its localisation is done by the system and not your app's code. You don't have to provide translation strings.

您遇到的是模拟器错误.它可以在设备上运行.我鼓励您在真实的硬件上测试您的应用程序.

What you are experiencing is a simulator bug. It works on the device. I encourage you to test your app on a real hardware.

这篇关于本地化系统生成的隐私警报消息iOS UIAlertView Xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆