即使我使用 iOS 10、Xcode 8 在 info.plist 中添加了 NSCameraUsageDescription,应用程序还是崩溃了
App crashes even though I added NSCameraUsageDescription in info.plist, using iOS 10, Xcode 8
已更新至 Xcode 8,我正在使用相机在我的应用程序上上传照片,应用程序崩溃并显示以下众所周知的消息:
This app has crashed because it attempted to access privacy-sensitive
data without a usage description. The app's Info.plist
must contain
an NSCameraUsageDescription
key with a string value explaining to the
user how the app uses this data.
在我的 info.plist
中添加了 NSCameraUsageDescription
,但无论如何我仍然遇到崩溃。清理应用程序,删除应用程序,甚至重新启动 Xcode。创建了一个构建并将其发送给测试人员,希望它只是我的 phone,仍然崩溃。每次都发同样的信息。
有人遇到过这种情况吗?即使他们添加了 NSCameraUsageDescription
键,应用程序仍然会崩溃并显示相同的消息吗?有人成功了吗?我错过了什么吗?
<key>NSCameraUsageDescription</key>
<string>For user to take photos to upload on its profile.</string>
提前致谢
在 iOS 10 上遇到了同样的问题。您必须添加类似这样的内容 "NSCameraUsageDescription" = "Used to scan barcodes";到您的 Info.Plist.string 以本地化每种语言的警报描述。
已更新至 Xcode 8,我正在使用相机在我的应用程序上上传照片,应用程序崩溃并显示以下众所周知的消息:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's
Info.plist
must contain anNSCameraUsageDescription
key with a string value explaining to the user how the app uses this data.
在我的 info.plist
中添加了 NSCameraUsageDescription
,但无论如何我仍然遇到崩溃。清理应用程序,删除应用程序,甚至重新启动 Xcode。创建了一个构建并将其发送给测试人员,希望它只是我的 phone,仍然崩溃。每次都发同样的信息。
有人遇到过这种情况吗?即使他们添加了 NSCameraUsageDescription
键,应用程序仍然会崩溃并显示相同的消息吗?有人成功了吗?我错过了什么吗?
<key>NSCameraUsageDescription</key>
<string>For user to take photos to upload on its profile.</string>
提前致谢
在 iOS 10 上遇到了同样的问题。您必须添加类似这样的内容 "NSCameraUsageDescription" = "Used to scan barcodes";到您的 Info.Plist.string 以本地化每种语言的警报描述。