开发者

Xcode for Dummies: Can I simulate an iDevice camera?

开发者 https://www.devze.com 2023-02-07 23:58 出处:网络
So, is it possible to simulate the iPhone (arguably future i开发者_运维技巧Pad) camera in Xcode using the built in camera on my MacBook?

So, is it possible to simulate the iPhone (arguably future i开发者_运维技巧Pad) camera in Xcode using the built in camera on my MacBook?

I read some similar posts, but from the answers I feel it was left up in the air if it can or can not...

Thanks in advance!


No, you cannot. There is no camera app installed, and calling the camera related classes normally creates a crash. You can however sync photos to it.

Short answer: Never use the simulator. It's a joke. I think the only reason they put it in there is so that people can fiddle with stuff before they pay 100 dollars for the developer program.


You cannot simulate the camera using just iOS SDK frameworks while staying within the app sandbox.

However, on the Mac Simulator, you CAN reach outside the sandbox and connect to another camera server Mac application or process, which you would have to develop. So it's technically possible using Mac frameworks and processes outside of the iOS environment for debug purposes to get a camera view inside a Simulated but-non-pure iOS app. Not for dummies though...

0

精彩评论

暂无评论...
验证码 换一张
取 消