Android 类似 iOS 中的权限
在android中,您可以在清单文件中定义gps、短信发送、位置等权限。 iOS 中是否有类似的功能,让用户在安装之前就知道某个应用程序使用了手机的哪些功能? 或者,当某些功能想要使用某些功能(例如 GPS、短信...)时,用户在应用程序使用过程中是否会收到警告?
In android, you define permissions for gps, sms sending, location , .., in the manifest file.
Is there anything similar in the iOS, so the user would know what capabilities of the phone some app uses before installation?
Or is the user warned during app use when some function wants to use something (e.g. gps, sms...)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 iOS 中,您可以在类似于
Info.plist
的清单中声明您的应用程序要求。但此信息并不用于征求用户许可,仅用于确保设备兼容性。只有通知和位置服务需要用户许可,当您的应用程序第一次尝试使用相应的 API 时,系统会自动向用户请求该许可。
我的猜测是,许多其他权限已经通过 Apple Store 许可协议授予,用户必须接受这些权限,这与 Android 不同(我猜你可以在不使用市场的情况下安装应用程序,不是吗?这与合法的许可协议有很大不同)观点)
In iOS you declare your application requirements in its manifest-like
Info.plist
. But this information is not used to ask user permission, only for ensuring device compatibility.Only Notifications and Location Services require user permission, which is automatically asked to the user the very first time your application attempt to use the corresponding API.
My guess is that many other permissions are already granted via the Apple Store license agreement, that the user must have accepted, unlike Android (I guess you can install an app without using the market isnt? which changes a lot from a legal point of view)
iPhone 上没有权限之类的东西。
用户被警告的唯一事情是当应用程序使用其当前位置时 - 然后用户会收到系统警报提示,并且必须明确允许或拒绝应用程序访问位置数据。
关于短信和电子邮件,它们只能通过标准控制器创建和发送,因此用户无论如何都会意识到这一点
There's no such things as permissions on iPhone.
The only thing that user is warned about is when application uses his current location - then user is prompted with system alert and must explicitly allow or deny application's access to location data.
What concerns sms and email, they can be created and sent only via standard controllers so user will be aware of that anyway
在 iOS 上,您不必在某个特定文件中声明所有必要的权限。你只需使用它们。例如位置
info.plist
[IDFA]
on iOS you don't have to declare all necessary permissions in some specific file. You just use them. For example location
info.plist
[IDFA]