Skip to content

frslabs/atlas-sdk-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

atlas-sdk-ios

ATLAS SDK (iOS)

version

ATLAS SDK is used to capture all types of Location, Document, Face, Aadhaar, Data, Video, Email, Phone, Consent, Video Declaration.

You can find the latest changelog at Changelog.

Table Of Content

Set Up Atlas SDK

Requirements

Make sure that your project meets these requirements:

  • Xcode 16.4
  • iOS 13.0+
  • Swift 5.0

Permission

In Info.plist file add following code to allow your application to access Camera,Location,Microphone:

iPhone's camera: <key>NSCameraUsageDescription</key> <string>Allow access to camera</string>

Location access : <key>NSLocationWhenInUseUsageDescription</key> <string>Allow access to location</string>

Microphone access : <key>NSMicrophoneUsageDescription</key> <string>Allow access to microphone</string>

Install Atlas SDK

Cocoapods

You can use CocoaPods to install atlas by adding it to your Podfile:

source 'https://gitlab.com/frslabs-public/ios/atlas-sdk-ios.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
target '<Your Target Name>' do
use_frameworks!
pod 'Atlas', '1.0.1'
end
Save/Edit Netrc settings to install custom pod

You will need a valid netrc credentials to install digius from maven, which can be obtained by contacting [email protected].

  1. Create or edit .netrc file under current user's home directory
  2. Write the below lines into that file, replace <YOUR_USERNAME> and <YOUR_PASSWORD> with your credentials which is shared through email and save the file.
machine www.repo2.frslabs.space
login <YOUR_USERNAME>
password <YOUR_PASSOWRD>
  1. In terminal enter below command to install the pod

    pod install or pod update or pod install --repo-update.

To get the full benefits import Atlas wherever you import UIKit

import UIKit
import Atlas

Getting Started

Swift

  1. Initialize the input parameters and import delegate atlasControllerDelegate
class YourViewController: UIViewController,atlasControllerDelegate {

    func atlasScanner(_ scanner: Atlas.AtlasNavigationController, didFinishScanningWithResults results: Atlas.atlasScannerResults) {
        print(results.capturedSucess)
    }
    
    func atlasScanner(_ scanner: Atlas.AtlasNavigationController, didCancel cancel: String) {
        print("cancel")
    }
    
    func atlasScanner(_ scanner: Atlas.AtlasNavigationController, didFailWithError error: String) {
        print(error)
    }
}
  1. Invoke Atlas SDK
    // ...
    
    override func viewDidLoad(_ animated: Bool) {
        let scanner = AtlasNavigationController(delegate:self)
        scanner.modalPresentationStyle = .fullScreen
        scanner.checkId = "CHECK_ID" //Please input the check ID (Required params)
        scanner.AtlasUrlType = "STAGING" (or) "PRODUCTION"  (Required params)
        present(scanner, animated: true)
    }
    
    // ...    

Atlas Result

You can use the following methods in the AtlasResult instance to parse the success result:

Return Type Method Usage
String results.capturedSucess Returns a string value of "success" after successfull capture

results.capturedSucess returns capture is successfull instance with following methods:

  (results.capturedSucess)

Atlas Error Codes

Following error codes will be returned on the onError method of the callback

CODE DESCRIPTION
506 No internet connection
507 Failed to retrieve data
508 Invalid settings
509 Permission denied

Help

For any queries/feedback , contact us at [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published