离子:异常' nsinternalinconsistencyException'电容器迁移后使用相机

发布于 2025-01-25 17:36:38 字数 347 浏览 0 评论 0原文

我将离子应用程序从科尔多瓦迁移到电容器。当我测试相机(带有Cordova插件)时,我会有此错误。因此,我也使用电容器摄像头进行测试,并且有同样的错误。

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'main thread only'
terminating with uncaught exception of type NSException
(lldb) 

I migrate my ionic app from cordova to capacitor. When I test camera(with cordova plugin) I have this bug. So I test also with capacitor camera and I have the same bug.

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'main thread only'
terminating with uncaught exception of type NSException
(lldb) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若相惜即相离 2025-02-01 17:36:38

我找到了解决方案,

我将其添加到info.plist

<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to your Photo Library for uploading files</string>
<key>NSCameraUsageDescription</key>
<string>This app needs access to your Camera to allow you to take and upload a picture.</string>

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Here write description why you accessing photo library</string>

I found solution,

I add this to info.plist

<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to your Photo Library for uploading files</string>
<key>NSCameraUsageDescription</key>
<string>This app needs access to your Camera to allow you to take and upload a picture.</string>

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Here write description why you accessing photo library</string>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文