操作系统:IOS 10和watchos3请求ios导致watchos崩溃的photolibrary权限?
嗨,大家好,在开发我的最新应用时注意到了一个问题。 我的应用程序需要请求photolibrary许可才能保存一些图像。 在手表应用和ios中,我有在plist中添加了照片库访问权限。
我注意到,当我在前台运行手表应用程序时,在我的ios设备上按下请求许可时。 隐私 - 图片库使用情况说明
一旦IOS许可请求成功,手表应用程序会崩溃,用下面的代码程序退出代码为结束:0,这似乎是操作系统级别的行为我。
func requestPhotoLibraryPermission(){
PHPhotoLibrary.requestAuthorization { status in
switch status {
case .authorized:
break
default:
self.showErrorMessage(title: NSLocalizedString("Permission Denied", comment: "Permission Denied"), message: NSLocalizedString("You can enable Photo Library permission from the settings app", comment: "You can enable Photo Library permission from the settings app") ,completionBlock: {
})
// place for .NotDetermined - in this callback status is already determined so should never get here
break
}
}
}
正如你看到的,代码是非常简单的。任何人都有类似的问题有没有已知的解决方法?
与麦克风权限相同的问题。 – Werewolf
与Apple音乐相同的问题 –