Skip to main content

iOS

Integrating ezto verify's SDK into your Flutter project for iOS is straightforward. Follow our comprehensive documentation and sample code snippets to quickly implement user verification features.


1 Requirements

The minimum requirements needed in order to use the ezto verify SDK in your Flutter project. Ensure your development environment meets these prerequisites before proceeding with the integration.

  • Dart SDK 3.4.0 and above
  • Flutter SDK 3.22.0 and above
  • iOS 13 and above

2 Installation

To add the ezto verify SDK to your Flutter project, it is necessary to add the below code to your pubspec.yaml file in the dependency section.

eztoverify:
git:
url: git@gitlab.grootan.com:qlikverify/ezto_verify_flutter_sdk.git
tag: 5.0.0+24570401

3 Permissions

This section lists the permissions that need to be declared in your info.plist file located in <PROJECT_DIR>\ios\Runner\info.plist. These permissions are required for the ezto verify SDK to function correctly, allowing it to access the necessary device features.

<key>NSFaceIDUsageDescription</key>
<string>FaceID is required for user authentication</string>
<key>NSMicrophoneUsageDescription</key>
<string>Mic access is required for user authentication</string>
<key>NSCameraUsageDescription</key>
<string>Camera access is required for user authentication</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location access is required for user authentication</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location access is needed for user authentication.</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
  • Add required usage to Podfile for the permission handler located at <PROJECT_DIR>/ios/Podfile:
target 'Runner' do
use_frameworks!
use_modular_headers!

pod 'iProov' // Add this line for iproov install

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|

if ['iProov', 'Starscream'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
... // Here some configurations automatically generated by flutter

# Start of the permission_handler configuration
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_LOCATION=1',
'PERMISSION_CAMERA=1',
'PERMISSION_MICROPHONE=1',
'PERMISSION_NOTIFICATIONS=1'
]
end
end
end

4 Setup

This section explains how to set up the ezto verify SDK for different verification methods available. Currently, we have iOS setup available for FIDO, UAE PASS Verification, and DeepLink.

FIDO / Passkeys

To setup FIDO or Passkeys, it is necessary to include the webcredentials along with your workspace URL to ios/Runner.entitlements:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:example.ezto.io</string>
<!-- Replace example.ezto.io with your ezto verify workspace url -->
<!-- Go to Dashboard > Settings > General, copy the URL. -->
</array>
</dict>
</plist>


UAE PASS Verification

To enable UAE PASS Verification, it is required to add usage descriptions info.plist located in <PROJECT_DIR>\ios\Runner\info.plist:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>uaepass</string>
<string>uaepassstg</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
// Add your bundle_id
<array>
<string>{{bundle_id}}</string>
</array>
<key>CFBundleURLName</key>
<string>sdk_scheme</string>
</dict>
</array>

To setup the DeepLink functionality, it is required to add the below code to AppDelegate.swift located at <PROJECT_DIR>\ios\Runner\AppDelegate.swift :

import app_links

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {

// Retrieve the link from parameters
if let url = AppLinks.shared.getLink(launchOptions: launchOptions) {
// We have a link, propagate it to your Flutter app or not
AppLinks.shared.handleLink(url: url)
return true // Returning true will stop the propagation to other packages
}

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
  • Add the applinks with your workspace URL to ios/Runner.entitlements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:example.ezto.io</string>
<!-- Replace example.ezto.io with your ezto verify workspace url -->
<!-- Go to Dashboard > Settings > General, copy the URL. -->
</array>
</dict>
</plist>