Prerequisites for Swift App Development

Before diving into the world of swift app development, it's essential to understand the basics of authentication systems and common biometric authentication flows. Make sure you have both required API keys and a list of production hosts from your Keyless contact.

Setting Up the Keyless SDK

To get started with Keyless, you'll need to download the SDK from Cloudsmith repository using YOUR_CLOUDSMITH_TOKEN and KEYLESS_API_KEY. Additionally, make sure you have a list of node URLs (KEYLESS_HOSTS) that do not contain any trailing slashes.

Android Requirements for Swift App Development

The Keyless SDK uses Android 6.0 (API level 23) or above. To set up your app, enable camera permissions by adding the "Privacy - Camera Usage Description" key in your project's Info.plist file. You'll also need to enable background processing to synchronize Keyless data.

iOS Requirements for Swift App Development

The Keyless SDK uses Flutter 3.0 or higher and Dart 3.0 or higher. To set up your app, ensure you meet the native requirements for each platform, including minimum SDK 23 (Android 6.0), Kotlin 2.2.0 or higher, and target version 13.0 or higher.

Installing the Keyless SDK

To install the Keyless SDK, follow these steps:

  • If you're using the anti-inject variant with runtime application self-protection (RASP), set the package repository to partners-rasp-* and add the license file provided by your Delivery team.
  • Call Keyless from an Activity implementing ActivityResultCaller and extend any androidX activity that implements the interface for you.
  • Add the following rules to your Proguard configuration file: in the settings.gradle file of your Android application, add the following snippet... (and so on).

Configuring the Cloudsmith Package Registry

To configure Keyless Cloudsmith Package Registry, run the following commands in your terminal:

  • Replace with the name of the repo assigned to you by our delivery team.
  • Provide the scope keyless for Keyless Package registry.

Once you've set up the registry, open Xcode and go to File → Add Package Dependencies. A wizard will prompt you to insert the package. You can search for the package (e.g., keyless.mobile-sdk) and add it to your project and target.

Testing Release Candidates

If you're a partner, you'll have the opportunity to test release candidates before they receive final approval. To do so:

  • Manually download the Package from Cloudsmith using your assigned token.
  • Extract the archive and drag-and-drop the extracted folder inside your Xcode project.
  • Once dropped, if you already had a Keyless SDK Package configured, this will be substituted seamlessly. If not, add the KeylessSDK library to your target from the project settings.

Remember, since Cocoapods is in maintenance mode, it's recommended to integrate Keyless via SPM.