
Professional SDKs for every platform. Drop-in certificate pinning with automatic updates, zero downtime, and enterprise-grade security. No complex configuration required.
Select your development platform below for detailed integration instructions and code examples
Explore our complete documentation for in-depth guides, tutorials, API references, authentication methods, error handling, and production best practices.
Certificate pinning that mobile and security teams can rely on
Command-line interface for managing TrustPin projects and certificates
# Add TrustPin tap
brew tap trustpin-cloud/trustpin
# Trust the tap (required once on Homebrew 6.0+)
brew trust trustpin-cloud/trustpin
# Install TrustPin CLI
brew install trustpin-cli
# Or download directly
curl -L https://github.com/trustpin-cloud/homebrew-trustpin/releases/latest/download/trustpin-cli-macos-arm64 -o trustpin-cli
chmod +x trustpin-cli
sudo mv trustpin-cli /usr/local/bin/# Configure with your credentials
trustpin-cli configure
API Base URL (https://api.trustpin.cloud): https://api.trustpin.cloud
API Token: tp_your_token_here
✅ Configuration saved successfully!# Bash script for CI/CD
#!/bin/bash
set -e
# Sign with bring-your-own-key (BYOK)
$ trustpin-cli projects sign <<organization_id>> <<project_id>> --private-key <<private_key.pem>>
[1/5] Getting project information
ℹ️ Project: BYOK Project (Managed CDN with Bring Your Own Keys)
[2/5] Loading project configuration
[3/5] Preparing private key
ℹ️ Reading private key from file: <<private_key.pem>>
[4/5] Creating and signing JWT
[5/5] Uploading signed configuration
✅ Configuration published successfully!Your CLI application now has enterprise-grade certificate pinning. Certificates will be automatically updated without requiring app releases.
Native iOS SDK with full Swift and Objective-C support
// In Xcode:
// 1. File > Add Package Dependencies
// 2. Enter: https://github.com/trustpin-cloud/swift.sdk
// 3. Choose version and add to your target
// Or in Package.swift (requires iOS 13.0+ / Swift 5.5+):
dependencies: [
.package(url: "https://github.com/trustpin-cloud/swift.sdk", from: "6.2.0")
]// Download TrustPin-Info.plist from your project dashboard,
// then drop it into your app target (Target Membership: on).
import TrustPinKit
let config = try TrustPinConfiguration.fromPlist()
try await TrustPin.setup(config)// Attach the TrustPin URLSession delegate so pinning runs on the TLS handshake.
import TrustPinKit
final class NetworkManager {
private let trustPinDelegate = TrustPin.makeURLSessionDelegate()
private lazy var session = URLSession(
configuration: .default,
delegate: trustPinDelegate,
delegateQueue: nil
)
func fetchData() async throws -> Data {
let url = URL(string: "https://api.example.com/data")!
let (data, _) = try await session.data(from: url)
return data
}
}Your iOS/Swift application now has enterprise-grade certificate pinning. Certificates will be automatically updated without requiring app releases.
Android SDK with Kotlin-first design and Java compatibility
// In app/build.gradle.kts (requires Android API 25+ / Kotlin 2.3.0+ / JVM 11+)
dependencies {
// https://central.sonatype.com/artifact/cloud.trustpin/kotlin-sdk
implementation("cloud.trustpin:kotlin-sdk:6.2.0")
}
// In settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}// Download trustpin.json from your project dashboard,
// then drop it into android/app/src/main/assets/.
import android.app.Application
import cloud.trustpin.kotlin.sdk.TrustPin
import cloud.trustpin.kotlin.sdk.TrustPinConfiguration
import cloud.trustpin.kotlin.sdk.TrustPinError
import cloud.trustpin.kotlin.sdk.fromAssets
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
class App : Application() {
// TrustPin.setup is suspend, launch from an app-scoped coroutine scope.
private val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
override fun onCreate() {
super.onCreate()
appScope.launch {
try {
TrustPin.setup(TrustPinConfiguration.fromAssets(this@App))
} catch (e: TrustPinError) {
// Handle init failure (log, retry, surface to user).
}
}
}
}import android.content.Context
import cloud.trustpin.kotlin.sdk.TrustPin
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit
class NetworkManager(context: Context) {
suspend fun initialize() {
// Fail fast if TrustPin.setup hasn't completed yet.
TrustPin.requirePinned()
}
val httpClient: OkHttpClient by lazy {
OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.sslSocketFactory(TrustPin.makeSSLSocketFactory(), TrustPin.makeTrustManager())
.build()
}
}Your Android/Kotlin application now has enterprise-grade certificate pinning. Certificates will be automatically updated without requiring app releases.
Cross-platform Flutter SDK for iOS, macOS and Android apps
dependencies:
trustpin_sdk: ^6.2.0
# Run flutter pub get to install// Download TrustPin-Info.plist (→ ios/Runner/) and trustpin.json
// (→ android/app/src/main/assets/) from your project dashboard.
import 'package:flutter/widgets.dart';
import 'package:trustpin_sdk/trustpin_sdk.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Reads the platform-native config bundled with your app.
await TrustPin.shared.setupWithNativeBundle();
runApp(const MyApp());
}// Integration with dio
import 'package:dio/dio.dart';
import 'package:trustpin_sdk/trustpin_sdk.dart';
// Every HTTPS request now enforces certificate pinning.
final dio = Dio()
..interceptors.add(TrustPinDioInterceptor());
// The http package is also supported, see the SDK docs for TrustPinHttpClient.create().Your Flutter application now has enterprise-grade certificate pinning. Certificates will be automatically updated without requiring app releases.
Cross-platform React Native SDK with native pinning for iOS & Android
# Requires React Native 0.85+ (New Architecture), iOS 15+, Android API 25+
npm install @trustpin/react-native
# or
yarn add @trustpin/react-native
# iOS: install the native pods
npx pod-install// In app.json / app.config.js the Expo config plugin sets up pinning
// in native code, before any JavaScript runs.
{
"expo": {
"plugins": [
["@trustpin/react-native", {
"organizationId": "your-org-id",
"projectId": "your-project-id",
"publicKey": "LS0tLS1CRUdJTi...",
"mode": "strict"
}]
]
}
}
// Bare React Native? Call TrustPinReactNative.start() from AppDelegate.swift
// (iOS) and MainApplication.kt (Android). See the SDK docs.// Pinning is active automatically,every fetch is validated by
// native code, with no client wiring required.
import { TrustPin } from '@trustpin/react-native';
async function fetchData() {
// Fail-closed: gate critical requests on configuration readiness.
await TrustPin.awaitConfiguration(10_000);
const response = await fetch('https://api.example.com/data');
return response.json();
}Your React Native application now has enterprise-grade certificate pinning. Certificates will be automatically updated without requiring app releases.