Overview
Install the Credenza iOS SDK v1.2 using CocoaPods to ensure your project is set up to leverage Credenza's features effectively. Follow these instructions to start a new project or integrate into an existing one.
Preparation
Prerequisites
Before installing the Credenza iOS SDK v1.2, make sure you have the following prerequisites in place: Xcode installed, CocoaPods installed, a project created in Xcode, access to the terminal, and the KRYPTKEY provided by Credenza. Additionally, if you plan to use Credenza Passport's NFC features, ensure NFC capabilities are enabled.
Adding the library to your application
Adding credenzapassport to PodFile
To integrate the credenzapassport library into your iOS app, follow these steps:
Install https://cocoapods.org/
Create new project in Xcode
Open a Terminal window and In the project directory, type:
pod initThis will create a workspace with the CocoaPods as a separate project. Open the workspace.
If you already have an app and wish to integrate Passport, then you will already have a workspace with an existing PodFile.
Next steps
Add the following line to your PodFile:
pod 'credenzapassport'In the Terminal window, type:
pod initIn the info.plist, add the
KRYPTKEY. This will be provided to you by Credenza. Make sure you keep this value secure.
Requriements for Credenza Passport’s NFC features
If you plan on using Credenza Passport’s NFC features, then there will be some additional requirements:
Add the NFC “Capability” in the Signing and Capabilities section of Xcode.
Add NFC to the info.plist
SO18092 system codes for NFC Tag Reader Session: [12FC]
com.apple. developer.nfc.readersession.formsts: TAG
ISO7816 application identifiers for NFC Tag Reader Session: [D276000085010]
Comming Soon
We are also integrating QR Code reading to support scanning for Passport IDs and purchase/airdrop triggers. To enable scanning, the camera functionality must be enabled. Add QR to the info.plist attribute Privacy - Camera Usage Description to whatever you’d like the user to see when the QR Code is to be scanned (e.g., “Checking QR Code”). NOTE: In version 1, we require the installation of the SwiftQRScanner pod (include in the same way you do the Passport pod). In version 1.1, we are planning native integration.
Frequently Asked Questions
KRYPTKEY is a security key provided by Credenza that you need to add to the info.plist file in your project. Make sure to keep this value secure.
To enable NFC, add the NFC Capability in Xcode's Signing and Capabilities section and update your info.plist with the correct system codes and application identifiers. Follow the NFC setup instructions in the documentation.
If you face issues with pod install, ensure that CocoaPods is correctly installed and that your Podfile is correctly configured. Refer to CocoaPods documentation for troubleshooting steps.
To update the SDK version, modify the version number in your Podfile to the desired version, then run pod update in the Terminal. This will fetch and install the specified version.