Camera doesn't work inside the iOS Captive Network Assistant — by design?

I'm building a Wi-Fi captive portal (web page) that needs the camera to scan a boarding-pass barcode. Inside the iOS Captive Network Assistant (the sign-in pop-up that appears when you join Wi-Fi):

getUserMedia() (live camera) doesn't work, and

<input type="file" capture="environment">

opens only the photo library, not the camera. The same page works fine in full Safari on the same iPhone.

Is camera access intentionally blocked in the CNA, or is there a supported way to use it? Has anyone gotten the camera working inside the captive portal on iOS? Thanks!

Answered by DTS Engineer in 895204022

This doesn’t surprise me. iOS puts pretty strict limits on programs that try to use the camera from the ‘background’ [1], and that includes both third-party app extensions and its own internal processes, like CNA.

I doubt there’s a way around this, although I’m not sufficiently expert in this stuff to say that definitively. However, I’m confident enough to suggest that you to file an enhancement request for a documented way to make this work.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] But which I mean programs that aren’t the frontmost app. The fact that CNA has a window on screen isn’t the gating factor here.

Accepted Answer

This doesn’t surprise me. iOS puts pretty strict limits on programs that try to use the camera from the ‘background’ [1], and that includes both third-party app extensions and its own internal processes, like CNA.

I doubt there’s a way around this, although I’m not sufficiently expert in this stuff to say that definitively. However, I’m confident enough to suggest that you to file an enhancement request for a documented way to make this work.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] But which I mean programs that aren’t the frontmost app. The fact that CNA has a window on screen isn’t the gating factor here.

Camera doesn't work inside the iOS Captive Network Assistant — by design?
 
 
Q