Prepare Environment

The following environment setup is based on Xcode 13 IDE, the setup may vary slightly when using other versions of Xcode.

Prerequisites

  • Xcode 10.0 IDE or above

  • iOS 9.0 or above

  • iPhone 6 and above is supported with arm64

  • iOS 13.0 or above is required to have reading capabilities, e.g. passport chip reading through NFC

  • Add the dependency "pod 'UqudoSDK', '3.1.1'" in your Podfile. If you use SwiftPM (Swift Package Manager) please use the URL https://github.com/uqudo-io/SPM-UqudoSDK.git

  • Add the dependency "pod 'OpenSSL-Universal', '1.1.1700'" in your Podfile. If you use SwiftPM (Swift Package Manager) please use the URL https://github.com/krzyzanowskim/OpenSSL.git

Xcode Environment Setup for iOS

  1. The SDK comes with a default layout and default texts. In order to override the default configuration you have to add the following configuration files to your resource bundle:

    • uq-styles.plist

    • uq-styles-dark.plist

    • uq-text.plist

  2. In your application .plist file enable the following options:

    • "Privacy - Camera Usage Description" and add the desired description

    • "Privacy - Photo Library Usage Description" and add the desired description

    • "Privacy - NFC Scan Usage Description" and add the desired description (Note: iOS target 13.0 or above required)

    • "ISO7816 application identifiers for NFC Tag Reader Session" and add the AID for each document type: The AID varies based on the type of the document. Please request the ID from Uqudo Support through the customer portal. 00000000000000 (The enclose)

    • Add the custom key "com.apple.developer.nfc.readersession.formats" with type array and add the following items: NDEF TAG

    • Add the key "LSApplicationQueriesSchemes" with type array and add the following items: cydia

  3. Add the following key if you want to use the enableUpload feature:

        <key>CFBundleDocumentTypes</key>    
        <array>
            <dict>
                <key>CFBundleTypeIconFiles</key>
                <array/>
                <key>CFBundleTypeName</key>
                <string>com.adobe.pdf</string>
                <key>LSHandlerRank</key>
                <string>Owner</string>
                <key>LSItemContentTypes</key>
                <array>
                    <string>com.adobe.pdf</string>
                </array>
            </dict>
        </array> 
  4. In "Signing & Capabilities" add the capability "Near Field Communication Tag Reading":

  5. If you are targeting iOS version 13 and above, make sure you donโ€™t have the following line in the file "<App Name>/<App Name>.entitlements": <string>NDEF</string> for key "com.apple.developer.nfc.readersession.formats"

Build using a custom endpoint

N.B.: this is only required if you have an on prem installation of the uqudo platform. Also, only certain domains are permitted.

In order to build your application and tell the SDK to point to another environment you can simply configure the following string resource in your application Info.plist with the provided url:

<key>UQApiBaseURL</key>
<string>https://hostname</string>

N.B.: donโ€™t add any / after the hostname

Last updated