Can an iPhone Web App use the Camera?

自闭症网瘾萝莉.ら 提交于 2019-12-19 17:42:18

问题


I have a web app and I want to take photos and then upload them to a server. Can this be done with a webapp?


回答1:


[edit] It's now possible, please see answers below.

No, webapp cannot access internal devices. Try PhoneGap to make the gap between your app and the internal devices. But that will compile an application, which need to be distrubuted via the Apple Store.




回答2:


This is now possible with iOS 6 and HTML5.

Using the <input> tag, you can get file input from either the camera or gallery (the familiar "take photo or video, choose existing"). Try:

<input type="file">

this will pull up the aforementioned dialog box of options. You can also add the accept attribute to specify whether you want image or video, like so:

<input type=file accept="image/*">

Max Firtman has a great article about what you can do with iOS 6 and HTML5 here: http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers




回答3:


You'll be able to create 'provisioning profiles' for up to 100 different devices to directly install your apps on, without going through the App Store. The install process isn't as straightforward as calling up a URL or downloading something from the App Store, but at least you can limit distribution to specific people without revealing the existence of the app in the public App Store.

Also see iPhone App Minus App Store?



来源:https://stackoverflow.com/questions/2647892/can-an-iphone-web-app-use-the-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!