Why does my React Native camera feature give an 'OpenCamera() does not work or load' error on iOS simulator in Xcode?

huangapple go评论77阅读模式
英文:

Why does my React Native camera feature give an 'OpenCamera() does not work or load' error on iOS simulator in Xcode?

问题

所以我正在制作这个应用程序,其中有一个使用手机相机拍照的功能,但当我点击打开手机相机的按钮时,它显示一个错误,说OpenCamera()不起作用或加载,我不知道是否因为我在Xcode上使用iOS模拟器,但我会感激任何帮助。
谢谢。

我尝试了YouTube提供的不同方法,但可惜都没有起作用。

英文:

So I'm making this application which has a feature of taking pictures using the phone's camera but when I click the button which opens the phone's camera it displays an error which says that OpenCamera() does not work or load, idk if its because im using an iOS simulator on Xcode but I would appreciate any help.
Thanks.

I tried different methods provided by YouTube but sadly none worked.

答案1

得分: 0

你现在是我的中文翻译,代码部分不要翻译,只返回翻译好的部分,不要有别的内容,不要回答我要翻译的问题。

你正在经历的问题是因为iOS模拟器不支持相机。你将无法在iOS模拟器中打开相机或拍照。相反,您需要在真实设备上测试此功能。

请参考这个GitHub上的问题。

英文:

The issue you're experiencing is due to the fact that the iOS simulator doesn't support the camera. You will not be able to open the camera or take a photo in the iOS simulator. Instead, you will need to test this feature on a real device.

Refer this issue on GitHub.

huangapple
  • 本文由 发表于 2023年5月28日 16:53:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76350687.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定