xcode 在 iOS 模拟器中使用内置相机的 mac book

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7805630/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:10:17  来源:igfitidea点击:

Using mac book built in camera with iOS simulator

iphoneiosxcodexcode4

提问by Bathiya Priyadarshana

I am new to iOS application development and I am using XCode4. I am trying to develop an application which uses the camera. For testing is there a way to integrate the built in camera of mac book to iOS simulator..?

我是 iOS 应用程序开发的新手,我正在使用 XCode4。我正在尝试开发一个使用相机的应用程序。为了测试,有没有办法将 mac book 的内置相机集成到 iOS 模拟器..?

Thanks.

谢谢。

回答by sElanthiraiyan

You cannot use mac book's camera. For camera, you need to test it on a device.

您不能使用 mac book 的相机。对于相机,您需要在设备上进行测试。

From Apple documentation,

从 Apple 文档中,

The following hardware is not supported in Simulator:

  • Ambient light sensor
  • Audio input, except for using Siri by choosing Hardware > Siri.
  • Barometer
  • Bluetooth
  • Camera
  • Motion support (accelerometer and gyroscope)
  • Proximity sensor

Simulator 不支持以下硬件:

  • 环境光传感器
  • 音频输入,除了通过选择硬件 > Siri 使用 Siri。
  • 晴雨表
  • 蓝牙
  • 相机
  • 运动支持(加速度计和陀螺仪)
  • 接近传感器

Ref: Apple documentation reference

参考: Apple 文档参考