Skip to content

feat: grant WKWebView camera permission for liveness challenge - #224

Merged
Mourtadah-Karim-IMI merged 4 commits into
masterfrom
feat/eng-5947-ios-camera-permission
Jun 19, 2026
Merged

feat: grant WKWebView camera permission for liveness challenge#224
Mourtadah-Karim-IMI merged 4 commits into
masterfrom
feat/eng-5947-ios-camera-permission

Conversation

@Mourtadah-Karim-IMI

Copy link
Copy Markdown
Contributor

WKWebView auto-denies getUserMedia, so the camera-based liveness challenge can't start the camera on iOS. This adds the WKUIDelegate permission method to grant it, camera only since the challenge doesn't use the microphone (which keeps NSMicrophoneUsageDescription out of it). It also adds NSCameraUsageDescription to the example apps and a short README note that integrating apps need to declare it. Liveness requires iOS 15.

Verified the SDK framework builds and the full unit suite passes (123 tests).

ENG-5947, ENG-5978

MrMartyK added 4 commits June 16, 2026 15:33
Implement WKUIDelegate.requestMediaCapturePermissionFor to grant camera
capture so the camera-based liveness challenge's getUserMedia call can
start; WKWebView auto-denies otherwise. Camera-only — the challenge uses
video with audio:false, and denying microphone avoids requiring the host
app to declare NSMicrophoneUsageDescription. Add NSCameraUsageDescription
to the example app Info.plist and bump the podspec to 3.1.0.

ENG-5947, ENG-5978
- Log the capture-permission decision via Log.debug, matching the other
  delegate methods in this file.
- Add NSCameraUsageDescription to the example targets that use a generated
  Info.plist and so didn't inherit it from Shared/Info.plist: SwiftUI-Example
  (its partial Info.plist) and Passive-Example (INFOPLIST_KEY build setting,
  Debug + Release).
- Document the required NSCameraUsageDescription host-app key in the README
  pre-requisites.
- Clarify that .cameraAndMicrophone is intentionally denied; keep the doc
  comment ASCII-only.

ENG-5947, ENG-5978
- ci: build Passive-Example in samples_build (the only example target that
  relies on the new INFOPLIST_KEY_NSCameraUsageDescription build setting,
  so the change is now exercised in CI)
- docs: de-duplicate the microphone-denial rationale, keeping it inline
- docs: clarify the README camera-usage note wording

ENG-5947, ENG-5978
Address multi-reviewer consistency pass:
- Revert podspec 3.1.0->3.0.1 and drop the CHANGELOG entry. The recent 3.x
  cadence bumps the version in a dedicated release PR, and bumping here left
  Example/Podfile.lock stale (3.0.1) against the repo invariant that any
  podspec version change regenerates the lock. Deferring fixes both.
- Trim the requestMediaCapturePermissionFor doc comment to the file's terse
  one/two-line norm and drop the non-ASCII em-dash; the camera-only/mic
  rationale already lives in the inline comment.
@github-actions

Copy link
Copy Markdown

Cocoapods size report:

OLD: 0 bytes
NEW: 163544 bytes

DIFF: 163544 bytes

@matthew-ransley-imi
matthew-ransley-imi marked this pull request as ready for review June 19, 2026 15:49
@Mourtadah-Karim-IMI
Mourtadah-Karim-IMI merged commit d5a02d1 into master Jun 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants