I have a webpage with PWA capabilities.
On iOS safari I do get the usual OS dialog asking me if I want to take a photo or upload a picture from the photo library:
After "installing" it as an PWA via the menu "Add to Homescreen" button and starting it via homescreen, I still get the same options, "choose from library" still works, but when choosing "take a photo", the iOS camera app opens, as expected, but stays completely black.
html:
<head>
<meta charset="utf-8">
<title>dingsda user interface 2</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes">
<link rel="manifest" href="manifest.json">
(...)
<label class="fileContainer ui-btn">
<input type="file" accept="image/jpeg" id="photo_upload" multiple data-role="none"/>
</label>
only javascript connected:
document.getElementById("photo_upload").addEventListener("change",
function(){
console.log("got pic, will resize now:");
resizeBase64image(document.getElementById("photo_upload"),
function(base64img){
console.log("resized pic. will add it to src");
document.getElementById("addPhoto").src = base64img;
});
});
I have no ideas, nor did I find any clues about limitations. Also: it seems like it should not prompt the dialog nor the photo app anyhow. I am happy for any suggestions. either to fix it with HTML file-input or (if possible) alternatives.