The Swift SDK supports iOS 15+ and macOS 12+.Documentation Index
Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
Use this file to discover all available pages before exploring further.
OMSClient is the entry point for wallet auth, signing, signature verification, ID tokens, transaction helpers, and balance queries.
Install
Add the package in Xcode with File -> Add Package Dependencies, or add the exact package version toPackage.swift.
Podfile.
Create The Client
Create oneOMSClient when your app starts and keep it alive for the current app session.
| Property | Use |
|---|---|
oms.wallet | Authentication, session state, wallet selection, signing, signature verification, ID tokens, and transactions. |
oms.indexer | Token balance reads. |
oms.supportedNetworks | Networks supported by this SDK build. |
Authenticate With Email
Email auth is a two-step OTP flow.completeEmailAuth verifies the OTP, loads an existing wallet for the user, or creates one when needed. Wallet metadata and session state are persisted in the device keychain.
Send A Transaction
After authentication, send a native token transaction withoms.wallet.sendTransaction. Values are raw base-unit integer strings.
On testnets, fee options are automatically sponsored, so Polygon Amoy is a good first network for testing.