Xcode 中的 C++ 项目需要 NSCameraUsageDescription for MacOS Mojave
NSCameraUsageDescription needed for C++ projects in Xcode for MacOS Mojave
我正在尝试 运行 Xcode 中的 OpenCV 项目,似乎有新的需要为 C++ 应用程序提供 info.plist NSCameraUsageDescription。
2018-09-28 00:03:15.181948+0800 k_nearest_detector_v2[23505:710470] [access] 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.
Program ended with exit code: 9
我该如何着手为 C++ 项目创建 .plist 文件,因为它以前从未需要过。
找到解决办法。将包含所需 NSCameraUsageDescription、NSMicrophoneUsageDescription(或其他)的文件与来自 XCode 的组装文件放在一起(请参见下面的屏幕截图)。对于 Release 和 Debug 版本。
您甚至可以自动执行@Valery Gromov 描述的步骤。只需复制构建阶段中的文件。取消选中 Copy only when installing
复选框可以直接从 Xcode 运行 它。
我正在尝试 运行 Xcode 中的 OpenCV 项目,似乎有新的需要为 C++ 应用程序提供 info.plist NSCameraUsageDescription。
2018-09-28 00:03:15.181948+0800 k_nearest_detector_v2[23505:710470] [access] 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.
Program ended with exit code: 9
我该如何着手为 C++ 项目创建 .plist 文件,因为它以前从未需要过。
找到解决办法。将包含所需 NSCameraUsageDescription、NSMicrophoneUsageDescription(或其他)的文件与来自 XCode 的组装文件放在一起(请参见下面的屏幕截图)。对于 Release 和 Debug 版本。
您甚至可以自动执行@Valery Gromov 描述的步骤。只需复制构建阶段中的文件。取消选中 Copy only when installing
复选框可以直接从 Xcode 运行 它。