Skip to main content
Version: 3.6.x.x RR

iOS installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Nevis Mobile Authentication SDK into your Xcode project using CocoaPods, specify it in your Podfile:

Podfile
  source 'https://github.com/CocoaPods/Specs.git'
...
pod 'NevisMobileAuthentication', '~> 3.6.1', :configurations => ['Release']
pod 'NevisMobileAuthentication-Debug', '~> 3.6.1', :configurations => ['Debug']

Then execute pod install with update.

pod install --repo-update

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

If you have your Swift package set up, adding Nevis Mobile Authentication SDK as a dependency is as easy as adding it to the dependencies value of your Package.swift:

dependencies: [
.package(url: "https://github.com/nevissecurity/nevis-mobile-authentication-sdk-ios-package.git", .upToNextMajor(from: "3.6.1"))
]

Or you can follow Apple's instructions about adding package dependencies to your app.

note

Currently only the release flavor is released as SPM package.

Manual XCFramework integration

In case the SDK is provided as compressed archives, after unpacking, you see the following structure:

Nevis Mobile Authentication SDK iOS archive content
├── NevisMobileAuthentication
│ ├── LICENSE
│ ├── NevisMobileAuthentication.podspec
│ └── NevisMobileAuthentication.xcframework
│── NevisMobileAuthentication-Debug
│ ├── LICENSE
│ ├── NevisMobileAuthentication-Debug.podspec
│ └── NevisMobileAuthentication.xcframework
├── NevisMobileAuthentication-<version>-Docs.zip
└── README.MD
  • The NevisMobileAuthentication folder contains an XCFramework built with release flavor and the corresponding Podspec file.
  • The NevisMobileAuthentication-Debug folder contains an XCFramework built with debug flavor and the corresponding Podspec file.
  • The NevisMobileAuthentication-<version>-Docs.zip archive contains the API documentation.

As a first step move or copy both folders to your project files:

Sample project layout
├── Frameworks
│ ├── NevisMobileAuthentication
│ │ └── ...
│ └── NevisMobileAuthentication-Debug
│ └── ...
│── Podfile
│── Sample
└── Sample.xcodeproj

CocoaPods

To integrate the Nevis Mobile Authentication SDK using Cocoapods with local references, do the following:

  1. Create or edit your Podfile:
Podfile
  source 'https://github.com/CocoaPods/Specs.git'
...
pod 'NevisMobileAuthentication', :path => 'Frameworks/NevisMobileAuthentication', :configurations => ['Release']
pod 'NevisMobileAuthentication-Debug', :path => 'Frameworks/NevisMobileAuthentication-debug', :configurations => ['Debug']
  1. Execute pod install:
pod install
  1. Open the generated Xcode workspace.

Xcode

To integrate the Nevis Mobile Authentication SDK using Xcode, do the following:

  1. Open your application Xcode project or workspace.
  2. Drag and drop one of the frameworks into your project.
  3. Make sure the framework is listed under General > Linked Frameworks and Libraries.
info

Xcode does not support configuration based linkage out of the box. Only one framework can be linked at a time.

General notes

info

Although the primary language of the SDK is Swift, it also contains an Objective-C bridging header, so it can also be used for purely Objective-C projects after the appropriate import:

#import <NevisMobileAuthentication/NevisMobileAuthentication.h>

info

Set ENABLE_BITCODE to No as the SDK does not contain bitcode.

tip

Add a description to the NSFaceIDUsageDescription key in the Info.plist file of your application. Ideally, the NSFaceIDUsageDescription key value is not localized.

Info.plist
<key>NSFaceIDUsageDescription</key>
<string>Enabling Face ID allows you to use the Face Recognition authenticator.</string>