Installation

Native iOS Inform SDK

To get started, extract the .xcframework files from the Frameworks directory in the zip file.

Framework Files

  1. In Xcode, open your project and select your app target.
  2. In the General tab, find the section called ‘Frameworks, Libraries, and Embedded Content’. Add the frameworks to the project by clicking the + button at the bottom of that section.
  3. Select ‘Add Other…’ from the drop down menu in the bottom of the popup and then click ‘Add Files…’.
  4. Find and select the Validic frameworks that you want to add to the project and click ‘Open’. Make sure to use the .xcframework files from the Validic release zip and remove any older .framework files you may have installed already. See the Migration Guide on Installation for details.

To confirm the files were added correctly, you can check the target’s ‘Build Phases’ tab. You should see each framework listed in the ‘Link Binary With Libraries’ section (with status ‘Required’), and in ‘Embed Frameworks’ with the ‘Code Sign On Copy’ box checked.

Bridging with Swift

To use the frameworks with Swift, you will need to add a Bridging Header. In Xcode go to the File menu and under New select File (Cmd+N). In the New File dialog box choose ‘Header File’. Name the header file [ProjectName]-Bridging-Header.h.

Edit ProjectName-Bridging-Header.h and add the following lines:

#import <ValidicCore/ValidicCore.h>
#import <ValidicBluetooth/ValidicBluetooth.h>
#import <ValidicHealthKit/ValidicHealthKit.h>
#import <ValidicOCR/ValidicOCR.h>

Then go to the build settings of your target, search for the Swift Compiler section, and double click on the ‘Objective-C Bridging Header’ field. In the dialog box that appears enter the name of the bridging header file ProjectName-Bridging-Header.h.


Swift Package Manager

📘

Swift Package Manager Support Now Available

We have added support for SPM to our Native iOS Inform SDK. If you're interested in using SPM to manage your dependencies, please reach out to our Validic Support team to request access.

The following instructions require that SPM access must first be granted to your Artifactory user account.

You must have an Artifactory token to access the Validic Swift package repository. If you do not have credentials for the Validic Artifactory instance, please contact Validic Support.

Set up repository access

  1. Add the Validic Swift package repository to your global Swift package registry, scoped to ValidicMobile (all Swift packages use the scope ValidicMobile)
    swift package-registry set "https://validic.jfrog.io/artifactory/api/swift/mobile-swift" --scope=ValidicMobile --global
    
  2. Log in to the Validic Swift package repository
    • using your Artifactory encrypted password:
      swift package-registry login https://validic.jfrog.io/artifactory/api/swift/mobile-swift --username=[Artifactory username] --password=[Artifactory encrypted password]
      
    • OR using an Artifactory Identity Token:
      swift package-registry login https://validic.jfrog.io/artifactory/api/swift/mobile-swift --token=[Artifactory token]
      
  3. Restart Xcode

Add Swift packages to Xcode

  1. Open project settings by clicking the project in the Project navigator.
  2. Click the "Package Dependencies" tab.
  3. Click the (+), type the Swift Package name into the search box and hit [Enter]
    • Note: you must type the exact package name as [Scope].[Framework] in order to get a match. All Validic Swift Packages use the scope ValidicMobile. Available [Framework] options are ValidicCore, ValidicBluetooth, ValidicHealthKit, ValidicOCR, and ValidicOneTouch. E.g. to add ValidicCore, search for ValidicMobile.ValidicCore.
  4. Choose the package and click "Add Package".
  5. Click "Add Package" in the popup to confirm.