Skip to content

iOS App Configuration

Choose your mobile platform to view the native SDK integration guide.

If you’re using the SDK within an iOS application, you will need to enable some settings specific to iOS, for our SDK to operate the best it can.


Info.plist
<key>NSCameraUsageDescription</key>
<string>Camera permission is required to take a photo of your ID.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone permission is required to record a video of your ID.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo library permission is required to upload a photo of your ID.</string>
// Allow inline video/camera playback - Enables videos to play within the WebView rather than fullscreen
webViewConfig.allowsInlineMediaPlayback = true
// Disable user interaction requirement for media playback - Critical for allowing camera access without user tap/interaction
webViewConfig.mediaTypesRequiringUserActionForPlayback = []
// Enable HTTPS upgrades (iOS 15+) - Automatically upgrades HTTP connections to HTTPS when possible
if #available(iOS 15.0, *) {
webViewConfig.upgradeKnownHostsToHTTPS = true
}
// Enable JavaScript (iOS 15+) - Ensures JavaScript is enabled, which is required for the web application
if #available(iOS 15.0, *) {
let preferences = WKWebpagePreferences()
preferences.allowsContentJavaScript = true
webViewConfig.defaultWebpagePreferences = preferences
}
// Configure content inset adjustment behavior - Prevents automatic content insets that could affect layout
webView.scrollView.contentInsetAdjustmentBehavior = .never
// Set delegate for handling navigation events - Required for intercepting URL changes and handling redirects
webView.navigationDelegate = self

Implementing this handler allows for auto-approval of camera permissions for trusted domains, such as the verification flow Ria uses to ensure safe money transfer.

// Allows auto-approval of camera permissions for trusted domains
// DOCS: https://developer.apple.com/documentation/webkit/wkuidelegate/3763087-webview
@available(iOS 15.0, *)
func webView(_ webView: WKWebView,
requestMediaCapturePermissionFor origin: WKSecurityOrigin,
initiatedByFrame frame: WKFrameInfo,
type: WKMediaCaptureType,
decisionHandler: @escaping (WKPermissionDecision) -> Void) {
// Auto-approve camera access for trusted domains
if origin.host.contains("riamoneytransfer.com") {
decisionHandler(.grant)
} else {
// For all other domains, show the permission prompt
decisionHandler(.prompt)
}
}