Iphone simulator and webcam

2019-04-04 07:06发布

Can we make able the iphone simulator to capture an image via webcam, I've written a program to take image from iphone camera. Can i test this with the iphone simulator??? Pls help

4条回答
淡お忘
2楼-- · 2019-04-04 07:25

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

查看更多
Emotional °昔
3楼-- · 2019-04-04 07:43

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
查看更多
聊天终结者
4楼-- · 2019-04-04 07:46

(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?

查看更多
聊天终结者
5楼-- · 2019-04-04 07:51

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.

查看更多
登录 后发表回答