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.
Camera and microphone permissions
Section titled “Camera and microphone permissions”<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>iOS WebView Configuration
Section titled “iOS WebView Configuration”// Allow inline video/camera playback - Enables videos to play within the WebView rather than fullscreenwebViewConfig.allowsInlineMediaPlayback = true
// Disable user interaction requirement for media playback - Critical for allowing camera access without user tap/interactionwebViewConfig.mediaTypesRequiringUserActionForPlayback = []
// Enable HTTPS upgrades (iOS 15+) - Automatically upgrades HTTP connections to HTTPS when possibleif #available(iOS 15.0, *) { webViewConfig.upgradeKnownHostsToHTTPS = true}
// Enable JavaScript (iOS 15+) - Ensures JavaScript is enabled, which is required for the web applicationif #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 layoutwebView.scrollView.contentInsetAdjustmentBehavior = .never
// Set delegate for handling navigation events - Required for intercepting URL changes and handling redirectswebView.navigationDelegate = selfCamera Permission Handler
Section titled “Camera Permission Handler”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) }}