← Back to Guides

iOS Integration Guide

Integrate UnifiedLicensing license validation into your iOS or iPadOS app using native Swift and URLSession. No third-party SDK required — everything works with the standard library.

1. Quick Start

The fastest way to validate a license is a single async call with URLSession:

import Foundation

let url = URL(string: "https://api.unifiedlicensing.com/api/v1/validate-license")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("ul_YOUR_KEY", forHTTPHeaderField: "x-vendor-api-key")

let body = [
    "license_key": "XXXX-XXXX-XXXX-XXXX",
    "product_key": "my-product",
    "platform": "mobile"
]
request.httpBody = try JSONSerialization.data(withJSONObject: body)

let (data, _) = try await URLSession.shared.data(for: request)
let result = try JSONDecoder().decode(ValidationResponse.self, from: data)
print("Valid:", result.success)
Tip: All API calls are plain HTTPS POST requests with JSON bodies. If your app can make a network call, it can use UnifiedLicensing.

2. Setup

Before writing any code you need two identifiers:

  1. Vendor API Key — log into the vendor dashboard and copy your key from the account section. It starts with ul_.
  2. Product Key — open the Products tab in the same dashboard and copy the key of the product this app belongs to.

You will pass both values on every request: the API key goes in the x-vendor-api-key header, and the product key goes in the JSON body as product_key.

3. Project Setup

No special configuration is needed: