📱iOS Programming
Last updated
Last updated
These instructions assume a development methodology leveraging Swift programming language; you will be adding the AuthenticAction™ SDK to your iOS project within Xcode. A programmatic interface to the IronVest SDK is provided using standard iOS framework architecture.
Xcode and the Xcode logo are trademark and property of Apple Inc.
IronVest will supply the necessary libraries in the form of a zip file containing the Swift Package. Complete the following steps to import the framework into your Xcode project:
Download the .zip which contains Collector Framework
Unzip the contents of the zip file
Move "Collector" folder inside your project. Place it as illustrated below.
Open your project in Xcode.
Select Project, Open Project Settings, Switch to Package Dependencies & Click add (as illustrated below)
Now Click on "Add Local" as illustrated below
Select the package which you added locally
Now, Select all packages & select Target in which you wish to add those packages
After import, this is how your project structure would look like & at the bottom, it would show up dependency which we just added.
Linking and Embedding the SDK Framework
Ensure that the dependency is available to your application, Open Project settings, select target, switch to General Tab & make sure that dependency is added as illustrated below.
Open your project's Podfile
and add following line
Make sure that you specify full path of the SDK.
For specific functionalities that the collector framework leverages, the user will be prompted to allow the permissions. To inform your user and increase the likelihood that they will allow the permission when prompted, you will need to ensure the appropriate permissions explanations are set in your bundles Info.plist file.
Specifically, the collector framework leverages the camera and screen capturing functionalities. To set these permissions descriptions within your Xcode project, follow these steps:
Open the “Info” View in your project settings.
Expand “Custom iOS Application Target Properties” section.
Look for the key “Privacy-Camera Usage Description”; if it is not available, select one of the “+” buttons and scroll down the list to find it and add it to the list.
Change the value to a suitable description for your user, explaining why you want the permission; For example, “$(PRODUCT_NAME) would like camera permission so that AuthenticAction security can protect your session”. (see figure 8).
Add the Key “Privacy – Photo Library Usage Description”, similarly setting the value to something that will make sense to your user (see figure 7), such as “$(PRODUCT_NAME) would like photo library permission so that AuthenticAction security can protect your session”.
Please refer to a short video clip for a demonstration of how the instructions above are applied.
AASDKManager is an interface with which you can easily access most of the SDK features.
With AASDKManager, as a programmer, you can focus on utilising features with provided singleton-interface.
The general collector allows for using the camera along with some sensor collecting.
You can start listening and collecting sensor events like this:
cid = Customer Specific Identifier. This identifier will be provided by IronVest
baseUrl = This baseUrl will be provided by IronVest
csid = Customer Session Identifier. Usually it's a unique session identifier for each user session. This is the identifier by which the session can be queried during validation or looked for in the dashboard
userID = Unique User Identifier.
If CSID or UserID change later or either of the values was not available during the initial initialization, they can be updated later.
Make sure to add NSCameraUsageDescription
to Info.plist
IMPORTANT NOTE: Some device versions may not perform correctly when a camera preview is shown on a screen that has also a password input field presented. To avoid this it's recommended to use the option to run the SDK with active auth collector without camera-preview. The following lines demonstrate how this can be achieved:
NOTE: Make sure to stop the capture, before calling a subsequent startCamera to avoid calling startCamera twice in a row.
NOTE: Make sure to stop the capture, once the authentic action is completed. Without it, front-camera will stay open & your application will keep collecting camera frames and continuously show the green camera indicator to a user.
In some of the cases, App may need to submit data from custom fields.
E.g. item picker, date picker, segment-control, switch on-off, check-boxes.
For such scenarios, you can use external Event provider.
Here are the input types for such external events.
The SDK generates logs throughout its execution. The most recent logs are stored in memory and can be retrieved for problems troubleshooting. Below is an example of how these logs can be put in a variable or in the Pasteboard to be shared with someone else.
Please refer to a short video clip for a demonstration of how the instructions above are applied.