Skip to content

Extension Detection

wklm edited this page Mar 18, 2026 · 1 revision

Extension Detection

@ios-web-bluetooth/detect helps your app detect the iOSWebBLE Safari extension and show an install prompt when it is missing.

Install

npm install @ios-web-bluetooth/detect

Main API

  • initIOSWebBLE(options)
  • isIOSSafari()
  • isExtensionInstalled()
  • showInstallBanner(options)
  • removeInstallBanner()

Typical Setup

import { initIOSWebBLE, isIOSSafari } from '@ios-web-bluetooth/detect';

if (isIOSSafari()) {
  await initIOSWebBLE({
    operatorName: 'FitTracker',
    banner: { mode: 'sheet', dismissDays: 14 },
    onReady: () => console.log('Extension active'),
    onNotInstalled: () => console.log('Prompting install'),
  });
}

React Setup

import { IOSWebBLEProvider } from '@ios-web-bluetooth/detect/react';

export default function App({ children }) {
  return <IOSWebBLEProvider>{children}</IOSWebBLEProvider>;
}

Plain HTML

<script src="https://ioswebble.com/webble.js"></script>

Install UX Guidance

  • Use this package only for detection and install UX
  • Use @ios-web-bluetooth/core for actual BLE operations
  • Send users to https://ioswebble.com/install when you need a direct install page

Important Note

This package does not polyfill BLE calls by itself. It handles extension detection and install prompts. Pair it with @ios-web-bluetooth/core for real Bluetooth operations.

More Detail

Clone this wiki locally