Iphone simulator and webcam

狂风中的少年 提交于 2019-12-03 23:40:36

You cannot take image via Mac's webcam from iPhone Simulator. For camera, you need to test it on a device.

Imagine if this would be possible on the Simulator, your Mac camera resoultion would be very different from the device one and your mac performances too. This could lead to bad surprises when moving and testing the application on the device.

(Sorry for my english)

In android world, the phone emulator don't have a live camera preview so the solution is create a "Webcam Server" running on emulator host (PC/Mac). This program is a socket server to capture frames from the built-in Webcam and transmit them using a socket.

Then in the phone code (android emulator) you can read the frame through socket and then shows and simulate a real phone camera.

Is that posible in iPhone simulator?

Gopal S Rathore

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

From Apple documentation:

The hardware features that are not simulated as of iOS 8.2 are:

  • Motion support (accelerometer and gyroscope) are unsupported.
  • Audio and video input (camera and microphone) are unsupported.
  • Proximity sensor
  • Barometer Ambient light sensor
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!