加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

[修正] iOS 10 使用相机及相簿闪退的问题修正

发布时间:2020-12-15 04:38:30 所属栏目:大数据 来源:网络整理
导读:iOS 10 新规定,在取用相机,相簿,联络资讯,麦克风需要在 Version Info 加入指定的 key,否则闪退: 注:将下面的 Key 复制到工程 Option -> Version Info 里 (按鼠标右键可以新增 Key) 常用 Key NSPhotoLibraryUsageDescription 使用相簿需要您的同意 s

iOS 10 新规定,在取用相机,相簿,联络资讯,麦克风需要在 Version Info 加入指定的 key,否则闪退:

注:将下面的 Key 复制到工程 Option -> Version Info 里(按鼠标右键可以新增 Key)

常用 Key

NSPhotoLibraryUsageDescription 使用相簿需要您的同意

<span style="color: #0000ff"><<span style="color: #800000">key<span style="color: #0000ff">>NSCameraUsageDescription<span style="color: #0000ff"></<span style="color: #800000">key<span style="color: #0000ff">>
<span style="color: #0000ff"><<span style="color: #800000">string<span style="color: #0000ff">>使用相机需要您的同意<span style="color: #0000ff"></<span style="color: #800000">string<span style="color: #0000ff">>

<span style="color: #0000ff"><<span style="color: #800000">key<span style="color: #0000ff">>NSContactsUsageDescription<span style="color: #0000ff"></<span style="color: #800000">key<span style="color: #0000ff">>
<span style="color: #0000ff"><<span style="color: #800000">string<span style="color: #0000ff">>使用联络资料需要您的同意<span style="color: #0000ff"></<span style="color: #800000">string<span style="color: #0000ff">>

<span style="color: #0000ff"><<span style="color: #800000">key<span style="color: #0000ff">>NSMicrophoneUsageDescription<span style="color: #0000ff"></<span style="color: #800000">key<span style="color: #0000ff">>
<span style="color: #0000ff"><<span style="color: #800000">string<span style="color: #0000ff">>使用麦克风需要您的同意<span style="color: #0000ff"></<span style="color: #800000">string<span style="color: #0000ff">><span style="color: #000000">

2018.01.08 新增:iOS 11.x 必需要加入下列,否則閃退

<span style="color: #0000ff"><<span style="color: #800000">key<span style="color: #0000ff">>NSPhotoLibraryAddUsageDescription<span style="color: #0000ff"></<span style="color: #800000">key<span style="color: #0000ff">>
<span style="color: #0000ff"><<span style="color: #800000">string<span style="color: #0000ff">>使用相簿需要您的同意<span style="color: #0000ff"></<span style="color: #800000">string<span style="color: #0000ff">>

完整列表:

NSAppleMusicUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Bluetooth:

NSBluetoothPeripheralUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Calendar:

NSCalendarsUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Camera:

NSCameraUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">
Contacts:

NSContactsUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Health Share:

NSHealthShareUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Health Update:

NSHealthUpdateUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Home Kit:

NSHomeKitUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Location:

NSLocationUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Location (Always):

NSLocationAlwaysUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Location (When <span style="color: #0000ff">in<span style="color: #000000"> use):

NSLocationWhenInUseUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Microphone:

NSMicrophoneUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Motion (Accelerometer):

NSMotionUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Photo Library:

NSPhotoLibraryUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Reminders:

NSRemindersUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Siri:

NSSiriUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string><span style="color: #000000">

Speech Recognition:

NSSpeechRecognitionUsageDescription
<<span style="color: #0000ff">string>My description about why I need this capability</<span style="color: #0000ff">string>

参考:

Apple 官方列表:

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读