授予访问摄像头的BSMachError [英] BSMachError on granting access to camera

查看:460
本文介绍了授予访问摄像头的BSMachError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这对我来说是一个谜,我希望你能帮助我...



我做了一个应用程序,有一个QR扫描仪,当访问它在一个新的安装在我的iphone一个警报后显示。问题是相机图像冻结,我无法扫描任何QR码...



这个问题消失,一旦我从xcode再次运行应用程序。 ..



这是在控制台打印出来的:



_BSMachError:port 13403; (os / kern)无效的能力(0x14)无法插入COPY_SEND



注意我已经添加了NSCameraUsageDescription到Info.plist。



感谢您的帮助!







我已经尝试添加NSPhotoLibraryUsageDescription和其他类似的权限到Info.plist文件,以及将本地化本地开发区域从EN更改为US(作为解决方案在其他线程读取),但仍然没有运气...






UPDATE#2: b $ b

我昨天创建了一个新项目,重复使用相同的代码,并且QR-scanner视图工作正常!





该项目是在Swift 2.2中创建的,并转换为新的语法Swift 3刚刚。这是我能想到的问题唯一真正的区别...



很高兴听到你对这件事的想法!

解决方案

发现问题!



以及,所以我开始调试!
在运行应用程序时,我检出了Debug View Hierarchy(控制台菜单中的3D快照功能)...



)在我的应用程序中设置,并添加了登录和注册视图
(来自教程: https://www.youtube.com/watch?v=PKOswUE731c )发送给项目。
现在我发现第二个UI实例是在 登录后创建的,因此导致了问题。
删除登录和注册表的连接解决了问题,所以现在我只需要找到在哪里做正确的实现为所有工作按照需要。



注意:
当我在iPhone上运行应用程序
的全新安装时,BSMachError消息仍然打印在控制台中。当在屏幕上显示允许访问摄像机的警报时,控制台中会显示错误。

该应用程序按预期运行,没有任何问题,因此我认为可以安全地说, br>
BSMachError-printtout应该被视为打印输出,而不是导致潜在崩溃的实际错误。


This is a mystery to me and I hope you can help me out...

I have made an app that has got a QR-scanner and when accessing it on a fresh install on my iphone an alert is shown subsequently. The problem is that the camera image freezes up and I am unable to scan any QR-codes...

This problem goes away once I run the application from xcode again...

This is what's printed out in the console:

_BSMachError: port 13403; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"

Note that I have added NSCameraUsageDescription to Info.plist.

Thanks for your help!


UPDATE: I've tried adding NSPhotoLibraryUsageDescription and other similar permissions to the Info.plist file, as well as changing the localization native development region from EN to US (as solution read in other threads) but still no luck...


UPDATE #2:

I created a new project yesterday, reusing the same code and the "QR-scanner view" works just fine!

Question: Could it be some form of conversion-related issue?

The project was created in Swift 2.2 and converted to the new syntax of Swift 3 just recently. That is the only real difference regarding the issue that I can think of...

Happy to hear your thoughts on this matter!

解决方案

Found the problem!

The issue suddenly occurred in my new project as well, so I started debugging! While running the app I checked out the Debug View Hierarchy (the 3D snapshot function in the console menu)...

So it turned out that there was a second instance of the UI running on top of another one - This is the reason why my camera-view appeared to have frozen.

Cause: I have a slide-out menu (from tutorial: http://dennissuratna.com/slide-out-navigation-swift/) set in my app and had added login and registration-views (from tutorial: https://www.youtube.com/watch?v=PKOswUE731c) to the project. Now I found out that the second instance of the UI was created after logging into the app and thereby causing the problem. Removing the connections to the login and reg-views solved the issue, so now I just have to find out where to make the proper implementations for it all to work as desired.

NOTE: The BSMachError-message is still printed out in the console whenever I run a fresh install of the app on my iPhone. The "error" is printed in the console when the alert for granting access to the camera is shown on screen.
The app runs as expected, without any problems, so I think it's safe to say that the
BSMachError-printout should be viewed as a printout and not an actual error that would cause a potential crash.

这篇关于授予访问摄像头的BSMachError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆