Installation

Complete installation guide for all platforms: Web, React Native, Flutter, and Swift.

Updated 24 January 2026
installationsetupnpmjavascriptreact-nativeflutterswiftios

Installation

Choose your platform below. All platforms require an API key from developer.onairos.uk.


Web (JavaScript / React / Next.js)

npm install onairos
import Onairos from 'onairos';

// Initialize with your API key
await Onairos.initializeApiKey({ apiKey: 'your_api_key' });

// Add the connect button
<OnairosButton
  AppName="YourApp"
  onResolved={(data) => console.log(data)}
  requestData={{
    personality_traits: {
      name: "Personality",
      description: "For personalized recommendations",
      reward: "Better experience"
    }
  }}
/>

→ Full Web Integration Guide


React Native

npm install @onairos/react-native
import { OnairosButton, initializeApiKey } from '@onairos/react-native';

await initializeApiKey({ apiKey: 'your_api_key' });

<OnairosButton
  AppName="YourApp"
  onResolved={(data) => console.log(data)}
  requestData={{
    personality_traits: {
      name: "Personality",
      description: "For personalized recommendations",
      reward: "Better experience"
    }
  }}
/>

→ Full Mobile Integration Guide


Flutter

dart pub add onairos
import 'package:onairos/onairos.dart';

OnairosButtonWrapper1(
  webpageName: 'YourApp',
  requestData: {
    'personality_traits': {
      'name': 'Personality',
      'description': 'For personalized recommendations',
      'reward': 'Better experience'
    }
  },
  returnLink: 'yourapp://callback',
  onResolved: (apiUrl, token) => print('Connected!'),
)

→ Full Mobile Integration Guide


Swift (iOS)

Add via Swift Package Manager in Xcode:

File → Add Package Dependencies

https://github.com/zd819/OnairosSwift
import OnairosSDK

// Initialize
Task {
    try await OnairosSDK.shared.initializeWithApiKey("your_api_key")
}

// Add connect button
let button = OnairosSDK.shared.createConnectButton { result in
    switch result {
    case .success(let data):
        print("Connected: \(data.connectedPlatforms.keys)")
    case .failure(let error):
        print("Error: \(error)")
    }
}
view.addSubview(button)

Requirements: iOS 14.0+, Xcode 13.0+, Swift 5.5+

→ Full Mobile Integration Guide


Using AI Assistants

Prefer AI-assisted setup? Use this prompt with Cursor, Claude, or ChatGPT:

Run npm install onairos, then read node_modules/onairos/llm.txt and set it up with API key {Your_API_Key}

→ See LLM Installation Guide