【连载】IOS12设计规范——请求权限

用户必须授予应用访问个人信息的权限,包括当前位置,日历,联系信息,提醒和照片。虽然人们很欣赏使用可以访问此信息的应用程序的便利性,但他们也希望能够控制其私有数据。例如,人们喜欢能够使用自己的实际位置自动标 记照片或找到附近的朋友,但他们也希望选择禁用此类功能。

image.png

仅在您的应用明确需要时才会请求个人数据。对个人信息的请求持怀疑态度是 很自然的,特别是在没有明显需要的情况下。确保仅在人们使用明确需要个人 数据的功能时才会发出权限请求。例如,应用可能仅在激活位置跟踪功能时请 求访问当前位置。

解释您的应用需要信息的原因。提供自定义文本(称为目的字符串或用法说明 字符串)以显示在系统的权限请求警报中,并包含一个示例。保持文字简短和 具体,使用句子,并礼貌,所以人们不会感到压力。无需包含您的应用名称- 系统已标识您的应用。有关开发人员指导,请参阅<u>保护用户的隐私</u>

image.png

仅在您的应用运行所需时才会在启动时请求权限。如果您的应用程序显然依赖于他们的个人信息来操作,则用户不会被此请求所困扰。

不要不必要地请求位置信息。在访问位置信息之前,请检查系统以查看是否已 启用位置服务。有了这些知识,您可以延迟警报,直到功能真正需要它,或者 完全避免警报。要了解如何实现位置功能,请参阅MapKit位置和地图编程指南

下边是【保护用户隐私】苹果官方给出的一些说明,原文和译文,电脑翻译的凑合理解的看,理解大概意思就好:

Protecting the User’s Privacy

Secure personal data, and respect user preferences for how data is used.

保护个人数据,并尊重用户对数据使用方式的偏好。

Overview

Designing for user privacy is important. Most Apple devices contain personal data that the user doesn’t want to expose to apps or to external entities. If your app accesses or uses data inappropriately, the user might stop using your app and even delete it from their device.

Access user or device data only with the user’s informed consent obtained in accordance with applicable law. In addition, take appropriate steps to protect user and device data, and be transparent about how you use it.

总览
设计用户隐私很重要。大多数Apple设备都包含用户不想向应用程序或外部实体公开的个人数据。如果您的应用程序访问或使用数据不当,则用户可能会停止使用您的应用程序,甚至将其从其设备中删除。

仅在根据适用法律获得用户的知情同意的情况下访问用户或设备数据。此外,请采取适当的步骤来保护用户和设备数据,并透明地使用它们。

Review Guidelines from Government and Industry Sources

Consult these documents:

  • [Mobile Privacy Disclosures: Building Trust Through Transparency]. The Federal Trade Commission’s report on mobile privacy.

  • [Opinion 02/2013 on Apps on Smart Devices]. The EU Data Protection Commissioners’ opinion on data protection for mobile apps.

  • [Privacy on the Go: Recommendations for the Mobile Ecosystem]. The California State Attorney General’s recommendations for mobile privacy.

  • Smartphone Privacy Initiative (2012) in [English] or [Japanese] and Smartphone Privacy Initiative II (2013) in [English] or [Japanese]. The Japanese Ministry of Internal Affairs and Communications’ Smartphone Privacy Initiatives.

政府和行业来源的审查指南

请查阅以下文件:

  • 移动隐私披露:通过透明度建立信任。联邦贸易委员会关于移动隐私的报告。
  • 关于智能设备上的应用程序的意见02/2013。欧盟数据保护专员对移动应用程序数据保护的意见。
  • 旅途中的隐私:有关移动生态系统的建议。加利福尼亚州总检察长对移动隐私的建议。
  • 智能手机隐私倡议(2012)在英国或日本在和Smartphone的隐私倡议II(2013)英语或日语。日本内务和通信省的“智能手机隐私权倡议”。

Request Access Only When Your App Needs the Data

Request access to sensitive user or device data—like location, contacts, and photos—at the time your app needs the data. Supply a purpose string (sometimes called a usage description string) in your app’s Info.plist file that the system can present to a user explaining why your app needs access. Provide reasonable fallback behavior in situations where the user doesn’t grant access to the requested data. For more details, see [Requesting Access to Protected Resources].

仅在您的应用需要数据时请求访问

在您的应用需要数据时,请求访问敏感的用户或设备数据,例如位置,联系人和照片。在应用程序文件中提供一个目的字符串(有时称为使用情况描述字符串),系统可以将其提供给用户,以解释为什么您的应用程序需要访问。在用户未授予对请求数据的访问权限的情况下,提供合理的后备行为。有关更多详细信息,请参见[请求访问受保护的资源]

Be Transparent About How Data Will Be Used

For example, when you submit your app to the App Store, specify a URL for your privacy policy or statement as part of your App Store Connect metadata. You can also summarize that policy or statement in your app description.

对如何使用数据保持透明

例如,当您将应用程序提交到App Store时,请为您的隐私权政策或声明指定URL,作为App Store Connect元数据的一部分。您还可以在应用说明中总结该政策或声明。

Give the User Control Over Data and Protect Data You Collect

Respect the user’s preferences, and take reasonable steps to protect the data that you collect in your apps:

  • Provide settings that allow the user to disable access to sensitive information. The operating system does this automatically for protected system resources—like location, contacts, and health data—through the Privacy menu of the Settings app. Extend this behavior to any data you cache from these sources or collect directly. For example, if your users build a social media profile containing personal information, offer them a way to delete the data (including any server copies you have).

  • When storing files in iOS, use the strongest data protection level that works for your app, as described in [Encrypting Your App’s Files . Use App Transport Security when sending user or device data over the network, as described in [NSAppTransportSecurity]

  • If your app uses theclass, respect the value of its Advertising Tracking property. If the user sets that property to false, then use the class only for limited advertising purposes, like frequency capping, attribution, conversion events, estimating the number of unique users, advertising fraud detection, and debugging. See the AdSupport framework for additional information.

  • If you must identify users persistently, use the Fo property of the class or the property of theclass.

授予用户对数据的控制权并保护您收集的数据

尊重用户的偏好,并采取合理的步骤来保护您在应用程序中收集的数据:

  • 提供允许用户禁用对敏感信息的访问的设置。操作系统通过“设置”应用程序的“隐私”菜单自动为受保护的系统资源(例如位置,联系人和健康数据)执行此操作。将此行为扩展到您从这些来源缓存或直接收集的任何数据。例如,如果您的用户构建了包含个人信息的社交媒体配置文件,请向他们提供一种删除数据(包括您拥有的任何服务器副本)的方法。

  • 在iOS中存储文件时,请使用适用于您的应用程序的最强数据保护级别,如加密应用程序的文件中所述。如NSAppTransportSecurity中所述,在通过网络发送用户或设备数据时使用App Transport Security 。

  • 如果您的应用程序使用该类,请尊重其属性的值。如果用户将该属性设置为false,则该类仅用于有限的广告目的,例如频次上限,归因,转化事件,估算唯一用户的数量,广告欺诈检测和调试。有关其他信息,请参见AdSupport框架。ASIdentifierManagerisAdvertisingTrackingEnabledASIdentifierManager

  • 如果你必须识别用户坚持,使用的财产类或对财产类。identifierForVendorUIDeviceadvertisingIdentifierASIdentifierManager

Use the Minimum Amount of Data Required

Request and use the minimum amount of user or device data needed to accomplish a given task. Don’t seek access to or collect data for unnecessary or non-obvious reasons, or because you think it might be useful later.

If your app supports audio input, configure your audio session for recording only at the point where you actually plan to begin recording. Don’t configure your audio session for recording at launch time if you don’t plan to record right away. The system alerts users when apps configure their audio session for recording and gives the user the option to disable recording for your app.

使用所需的最小数据量

请求并使用完成给定任务所需的最少用户或设备数据量。不要出于不必要或非显而易见的原因,或者因为您认为以后可能有用而寻求访问或收集数据。

如果您的应用支持音频输入,则将音频会话配置为仅在您实际打算开始录制的位置进行录制。如果您不打算立即录制,请不要在启动时配置音频会话以进行录制。当应用程序配置其音频会话进行录制时,系统会向用户发出警报,并为用户提供为您的应用程序禁用录制的选项。

总的来说权限请求是APP开发中非常重要的部分,设置不好功能上会有很大的限制,请求过大的权限又容易让用户担忧隐私而拒绝授权。再有就是请求权限的时机和话语描述。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 160,881评论 4 368
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 68,052评论 1 301
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 110,598评论 0 250
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,407评论 0 217
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,823评论 3 294
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,872评论 1 224
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 32,037评论 2 317
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,778评论 0 204
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,505评论 1 247
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,745评论 2 253
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,233评论 1 264
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,568评论 3 260
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,231评论 3 241
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,141评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,939评论 0 201
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,954评论 2 283
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,784评论 2 275