iOS Standalone PWA input capture

I think we found a regression in iOS 13.2/13.3 in regard to PWAs running in standalone mode.

Since on iOS PWA cannot access getUserMedia() we rely on the capture attribute on the HTML5 input tag to let the user take a picture and send it to a server.

Our code looks like this:

<div class="camera-upload">
     <input type="file" class="hidden" name="uploadPhotoInput" accept="image/*" capture="environment" (change)="onTakePhoto($event)">
     <button type="button" class="btn btn-primary">Take photo</button>
</div>

When we run the PWA in standalone mode on devices with iOS 13.1 or lower everything works as expected. If we run the PWA in browser mode on Safari everything works regardless of the iOS version.

When we run the PWA on devices with iOS 13.2 or 13.3 the feature works until we put the PWA in background and then in foreground again. After the PWA is sent to the background the capture launch the camera, but the preview is jut black. All the camera controls (flash, etc) works, but no picture is taken.

We run a test with the XCode console logger attached and it looks AVCaptureSession cannot be started after the app has been put in background once.

Here is a trace of the device logs:

https://pastebin.com/qGZpN6dM

We are building our PWA with Angular 8.

Has anyone seen something like this or can give us an hint?

@elbuild

https://bugs.webkit.org/show_bug.cgi?id=206219

Bug was posted here. Feel free to contribute to posting as well to gain traction, I'll be doing the same

206219 – [HTML5 App] Using <input> to call the device camera , Bug 206219 - [HTML5 App] Using <input> to call the device camera returns a . com/questions/59254979/ios-standalone-pwa-input-capture� We have been experiencing this exact same issue with our PWA (standalone application) with our customers running on iOS 13.2 or 13.3. Any time we attempt to access the camera after having closed the app and reopened it the camera interface loads, but there is just a black screen with no video feed from the camera.

Errr... no. 13.4 still does it, sorry.

I just tell users that if they get this, they should flick the app away to close it (rather than just going to home). A poor workaround, but hopefully a real fix will arrive someday.

185448 – getUserMedia not working in apps added to home screen , can you confirm getUserMeida for PWA on ios 13? app in reference is just accessing the iOS camera using <input file=""/> and the media capture api. I confirm that with 13.4 beta, in Standalone mode, Microphone works. At the left, what happens today in iOS 12.1, the external URL opens in Safari with a “back” button to your PWA in the status bar. At the right, two images on how it works on iOS 12.2 beta 1.

Finally, this has been resolved in iOS13.4

iPhone 11, iPadOS and iOS 13 for PWAs and web development, iOS 13 has just been released with the new branded iPadOS 13 coming in a few You captured a large volume but it was actually interesting. in the background in a timer: I stop receiving messages when the app is the background; It's still not possible to open a link in Safari from a standalone PWA. On March 30, the long-awaited iOS 11.3 update was released, with support for basic PWA features on iPhones and iPads, such as service workers and app manifest files. Although it is great that these are finally supported, the user experience of Progressive Web Applications on iOS is still not perfect.

What's new on iOS 12.2 for Progressive Web Apps, One year after the first initial support for PWAs on iOS, Apple released iOS Conic Gradients CSS, <datalist>, <input type=color>, Abortable Fetchs and in previous versions: no access to Camera within a standalone PWA, no full (so no PWAs on Chrome or Facebook); Universal Links / Link Capturing� Therefore you could hide the scan elements if you detect iOS and the standalone mode, in all other cases this app works fine. The fallback with the file input is the attempt to at least offer the general functionality inside an iOS PWA! Besides that the base for our class has some helpers, but nothing fancy so far.

PWA Bug ios 12.2 12.3 input type file capture camera : PWA, I have noticed an issue with input type file with capture camera on PWA apps created in react. When you For me it occurs only on iphone iOS +12.2, 12.3 Working offline, i.e. without an Internet connection, thanks to content caching. PWA� For the record iOS Safari has shipped support. As far as PWA support on iOS the only core thing missing is the support of the web manifest. The file that provides enhanced meta data about the web site to the browser. It facilitates the add to homescreen experience. Apple has shipped limit support, or really partial use, for this feature.

With WebAPK and Chrome, the PWA manages intents for its URL, so if you get a link to the PWA, it will be opened in standalone mode and not within the browser’s window. What PWAs can do on iOS

Comments
  • Same problem here, we tried many things like removing and creating file input dynamically on visibility change, or reloading page on visiblity change... so far no solution... we need a solution for this anyone found a solution ?
  • Same question here : stackoverflow.com/questions/59422838/…
  • Has anyone reported that bug to apple ? feedbackassistant.apple.com/welcome
  • Thank you for adding the bug report. I had this issue in 13.3. Updating to 13.5.1 did the trick for me.