Contents

qtrust-id/sequre-ios-sdk

**SequreSDK** is the official plugin from **Qtrust**, used to verify the authenticity of products issued by Qtrust’s clients.

Tutorial (Bahasa Indonesia)

Bagi pengguna yang ingin mempelajari integrasi SequreSDK lebih lanjut dalam Bahasa Indonesia, silakan kunjungi dokumentasi kami di Notion: SequreSDK Docs (Bahasa Indonesia)


Installation

Swift Package Manager (SPM)

Add the following to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/qtrust-id/SeQure-iOS-SDK.git", from: "1.1.4")
]

Or in Xcode:

  1. Go to FileAdd Package Dependencies...
  2. Enter the repository URL: https://github.com/qtrust-id/SeQure-iOS-SDK.git
  3. Select the version you want to use
  4. Click Add Package

Permissions

SequreSDK requires camera and location access to function correctly.

  • Camera: Add NSCameraUsageDescription to enable camera sessions.
  • Location: Add NSLocationWhenInUseUsageDescription or provide a Google Maps API key via gmapsKey, depending on your integration needs.

Usage

Import the SDK in your Swift files:

import SequreSDK

Prepare the required credentials:

// A unique number used for bundle ID authentication.
// This value will be provided after registering your app with Qtrust.
// Please contact the Qtrust admin (qtrust.id) for further registration.
let uniqueNumber: Int

// The bundle identifier of the client application.
let bundleID = Bundle.main.object(
    forInfoDictionaryKey: "CFBundleIdentifier"
) as? String ?? ""

Initialize the SDK when the app starts (for example, in AppDelegate or @main App):

SequreSDKInstance.shared.initialize(
    // Required credentials.
    // Both `uniqueNumber` and `bundleID` must be registered with Qtrust beforehand.
    // Please contact the Qtrust admin (qtrust.id) for registration assistance.
    uniqueNumber: uniqueNumber,
    bundleID: bundleID,

    // Use .stag for development and .prod for production
    flavor: AppEnvironment.isLive ? .prod : .stag
)

Network Configuration

You can customize the URLSessionConfiguration used by the SDK:

// Make sure call in init function
init() {
    Task {
        // recommended 
        await NetworkServiceSDK.shared.configure(
            with: [<ClassLogger.self>] 
        )

        // alternative
        await NetworkServiceSDK.shared.setSessionConfiguration { config in
            // Configure your URLSessionConfiguration here
        }
    }
}

Email Support

📧 contact@qtrust.id

Package Metadata

Repository: qtrust-id/sequre-ios-sdk

Default branch: main

README: README.md