Skip to content

Integration quickstart

This guide establishes the rules shared by every platform. Continue with one platform guide for package and code details.

ApplicationSupported integrationAvoid
AndroidAndroid AAR with Kotlin or Java APIRaw JNI
iOSP2PSdk Swift packageCopied C-to-Swift wrappers
Electron@p2psdk/electron in the main processNode wrapper in a renderer
Node.js host@p2psdk/nodeCustom ffi-napi declarations
Windows WPFP2PSdk.P2P.Wpf and P2PSdk.P2PRaw P/Invoke
Other approved Windows hostP2PSdk.P2PDirect C ABI unless required
Linux nativeStable C ABIRust internals

macOS and Unity wrappers are not part of SDK 1.0.0.

Your onboarding bundle must contain:

InputPurposeHandling
SDK 1.0.0 package or artifactApplication buildKeep wrapper and native binary together
Application API keySDK initializationMay be embedded by the app owner; do not log it
Consent page URLSDK-owned consent windowPublic HTTPS URL
Consent revoke URLUser revoke actionPublic HTTPS URL
Consent versionScopes stored decisionsChange only with a coordinated rollout
Receipt verification public keyLocal accepted-decision verificationPublic key; never substitute a private key

The onboarding environment also provides the service endpoints used internally by the SDK. Product code does not configure discovery tokens, connection URLs, reconnect delays, DNS policy, or transport credentials.

Follow the package-access instructions supplied during onboarding, then open the matching guide:

connect() starts the SDK supervisor. It does not wait for onboarding services, authentication, or transport setup to finish. Update UI and business state only from the connected/disconnected callbacks, wrapper events, or isOnline observation.

Create one SDK instance per logical peer, give it one clear owner, and keep it alive for the entire period the peer should remain active.

Disconnecting pauses a reusable instance. Revoking is a user-consent operation: after the remote revoke succeeds, the wrapper marks the local decision revoked and closes the active instance. A failed revoke keeps the current decision and instance intact so the user can retry.

  1. Start from a clean install or empty consent store.
  2. Decline and confirm that no SDK instance is returned.
  3. Accept and confirm that an instance is returned only after local receipt verification.
  4. Call connect() and wait for the connected event.
  5. Interrupt network access and record the disconnected reason.
  6. Restore network access and confirm automatic reconnection.
  7. Revoke consent and confirm the instance becomes unusable.
  8. Shut down and verify no SDK call occurs after close, free, or dispose.

Continue with Testing your integration for the full release matrix.