Shield
Shield 是一个 iOS/macOS/tvOS 框架,它包装了各种授权 API(例如相机、照片、位置)。它依赖于 Stanley 框架。
安装
您可以使用 cocoapods、Carthage 或作为框架来安装 Shield。当作为框架安装时,确保您也链接到 Stanley,因为 Shield 依赖于它。
Cocoapods
-
将 Shield 添加到您的 Podfile 中
-
拉入整个包或者
pod 'Shield'
-
拉入子规格
pod 'Shield/Camera' pod 'Shield/Photos'
-
-
更新您的包
$ pod update
子规格
Shield/Location
,包装CoreLocation
授权 API(《iOS》/《tvOS》/《macOS》)Shield/Camera
,包装AVFoundation
视频授权 API(《iOS》)屏蔽/麦克风
,封装了AVFoundation
音频授权 API(iOS
)屏蔽/媒体库
,封装了MediaPlayer
媒体库授权 API(iOS
)屏蔽/照片
,封装了Photos
授权 API(iOS
/tvOS
)屏蔽/健康
,封装了HealthKit
授权 API(iOS
)屏蔽/Siri
,封装了Intents
Siri 授权 API(iOS
)屏蔽/语音
,封装了Speech
语音识别授权 API(iOS
)屏蔽/蓝牙
,封装了CoreBluetooth
蓝牙外设授权 API(iOS
)屏蔽/事件
,封装了EventKit
事件和提醒授权 API(iOS
/macOS
)屏蔽/联系人
,封装了Contacts
授权 API(iOS
/macOS
)屏蔽/辅助功能
,封装了ApplicationServices
辅助功能授权 API(macOS
)屏蔽/账户
,封装了Accounts
社交账户授权 API(iOS
/macOS
)屏蔽/家庭
,封装了HomeKit
授权 API(iOS
)屏蔽/运动
,封装了CoreMotion
授权 API(iOS
)屏蔽/安全
,封装了提高执行权限的Security
授权 API(macOS
)屏蔽/本地
,封装了LocalAuthentication
指纹授权 API(《iOS/macOS
)屏蔽/通知
,封装了UserNotifications
授权 API(《iOS/tvOS
)屏蔽/视频订阅者账户
,封装了VideoSubscriberAccount
授权 API(《iOS/tvOS
)
依赖项
第三方
Apple
HealthKit
,仅限iOS
Intents
,仅限iOS
Speech
,仅限iOS
AVFoundation
,仅限iOS
Photos
,iOS
和tvOS
CoreBluetooth
,仅限iOS
ApplicationServices
,仅限macOS
CoreLocation
,iOS
、macOS
和tvOS
EventKit
,iOS
和macOS
Contacts
,iOS
和macOS
AppKit
,仅限macOS
MediaPlayer
,仅限iOS
HomeKit
,仅限iOS
Security
,仅限macOS
CoreMotion
,仅限iOS
Accounts
,iOS
和macOS
MediaPlayer
,仅限iOS
LocalAuthentication
,iOS
和macOS
UserNotifications
,iOS
和tvOS
VideoSubscriberAccount
,iOS
和tvOS