NSPhotoLibraryUsageDescription

NSPhotoLibraryUsageDescription

本文介绍了NSPhotoLibraryAddUsageDescription和NSPhotoLibraryUsageDescription有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序今天在Xcode9上进行更新时崩溃,在iOS11上进行测试。
添加 NSPhotoLibraryAddUsageDescription 然后它可以工作,即使我已经有 NSPhotoLibraryUsageDescription

My app get crashed today while updating on Xcode9, testing on iOS11.After adding NSPhotoLibraryAddUsageDescription then it works, even i already had NSPhotoLibraryUsageDescription.

我读过他们,一个支持iOS6,一个iOS11,但Apple没有提到他们之间有什么区别。

Ive read about them, one supported since iOS6, one iOS11 but Apple didn't mention what's difference between them.https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW73

如果我保留新的( NSPhotoLibraryAddUsageDescription ),它是否适用于iOS 8,或者我必须同时保留两者他们?

If i keep the new one (NSPhotoLibraryAddUsageDescription), will it work for iOS 8 also or i have to keep both of them?

推荐答案

自己回答最后一个问题:

To answer the last question on my own:

您需要声明 NSPhotoLibraryUsageDescription NSPhotoLibraryAddUsageDescription 才能在iOS 9,10.3和11上同时使用它。

You need to declare both NSPhotoLibraryUsageDescription and NSPhotoLibraryAddUsageDescription to get it WORKS on both iOS 9, 10.3 and 11.

从技术上讲,它有所不同。
我过去没有声明 NSPhotoLibraryUsageDescription ,它在iOS 9和11上工作正常,但在iOS 10.3上失败并崩溃。

Technically it's different.I used to not declare NSPhotoLibraryUsageDescription, it works fine on iOS 9 and 11 but failed and crashed on iOS 10.3.

这是Apple控制的非常糟糕的版本,而更高版本不符合并支持旧版本许可。

This is a really bad version controlling from Apple while higher version doesn't comply and support older version permission.

这篇关于NSPhotoLibraryAddUsageDescription和NSPhotoLibraryUsageDescription有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 09:33