Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/frol/near-connect-ios/llms.txt

Use this file to discover all available pages before exploring further.

Welcome to NEAR Connect iOS

NEAR Connect iOS is a native Swift package that brings the full NEAR Protocol wallet ecosystem to your iOS apps. Built on top of the proven @hot-labs/near-connect JavaScript library, it provides a seamless bridge between Swift and web-based NEAR wallets.

Why NEAR Connect iOS?

Universal Wallet Support

Connect to any NEAR wallet without implementing wallet-specific protocols. Support for HOT Wallet, MyNearWallet, Meteor, Intear, and more out of the box.

Modern Swift API

Clean async/await API built for SwiftUI. No callbacks, no delegates—just straightforward Swift concurrency.

Non-Custodial

Your app never touches private keys. All signing happens inside the user’s wallet. Only account IDs and public keys are stored locally.

Session Persistence

Connected accounts are automatically saved to UserDefaults. Users stay signed in across app launches.

Core Capabilities

Wallet Connection

Present the wallet selector UI and connect to any NEAR wallet with a single method call.

Token Transfers

Send NEAR tokens to any account with built-in yoctoNEAR conversion utilities.

Smart Contracts

Call any contract method with JSON arguments. Automatic Base64 encoding and gas defaults.

Message Signing (NEP-413)

Off-chain message signing for authentication and authorization flows.

Meta Transactions (NEP-366)

Sign delegate actions for gasless transactions and relayer patterns.

RPC Queries

Query account info, balances, and state directly from NEAR RPC nodes.

How It Works

NEAR Connect iOS uses a persistent WKWebView that loads the @hot-labs/near-connect JavaScript library from CDN. This architecture provides:
  • Minimal overhead: The WebView is created once and reused throughout the session
  • Wallet compatibility: Web wallets open in popup WebViews; native wallets (HOT, NEAR Mobile) launch via deep links
  • State preservation: JavaScript state survives across sheet presentations, maintaining wallet sessions
  • Automatic protocol updates: As new wallets join the NEAR ecosystem, they work automatically without SDK updates
The bridge WebView is invisible to users—they only see the wallet UI when approving transactions or signing in.

Supported Wallets

All wallets in the near-connect manifest work out of the box:
WalletTypePlatform
HOT WalletNative appTelegram Mini App
MyNearWalletWeb appBrowser-based
Meteor WalletWeb appBrowser-based
Intear WalletWeb appBrowser-based
New wallets are added to the manifest regularly. Your app gains support for new wallets automatically—no updates required.

Requirements

  • iOS 16.0+
  • Swift 5.9+
  • Xcode 16.0+

Network Support

Switch between mainnet and testnet with a single property:
walletManager.network = .testnet  // or .mainnet (default)

Next Steps

Installation

Add NEAR Connect iOS to your project with Swift Package Manager

Quick Start

Get from zero to a working wallet connection in under 5 minutes

API Reference

Explore the complete API with code examples

Example App

Browse the full-featured example app with transaction demos