콘텐츠로 이동
Busymate AI

이 가이드는 현재 영어로만 제공됩니다.

가이드

iOS, Android, 데스크톱용 네이티브 SDK

어시스턴트 채팅을 iOS, Android 또는 데스크톱 앱 안에 표시하고, 자체 백엔드로 로그인을 전달하며, 앱 릴리스가 필요한 변경을 확인하세요.

당신의 앱채널?channel=ios웹 뷰브릿지웹 뷰BusymateAI신원링크 열기닫기
이 페이지의 목차

Put Busymate AI chat inside a native app with an official, versioned SDK for iOS, Android, macOS, Windows, Linux, Electron or Tauri. Every platform has its own public repository, and your authenticated backend supplies the customer's identity. This page holds what the platforms share; each platform guide holds only what differs.

1. Choose your platform

  1. iOS: a Swift package for UIKit and SwiftUI.
  2. Android: a Gradle source module for Activities and WebViews.
  3. macOS, Windows, Linux, Electron and Tauri: one guide, one section per platform.

Pin distribution 1.0.5 on iOS, Android and the desktop SDKs. Identity uses protocol v2 (frozen bridge build 2.0.0) and the microphone uses protocol v1. The iOS microphone adapter is 1.0.1, the Android one is 1.0.2, and the macOS, Windows, Linux, Electron and Tauri adapters are 1.0.0. Android 1.0.5 also ships BusymateFiles (the chat's attach button) and iOS 1.0.5 a camera-key check; see each platform guide. These numbers describe different components, so do not compare them.

2. Which changes ship with your app

Hosted chat improvements reach your customers from the service, with no release of yours. These changes need a new build of your app:

  • upgrading the SDK to a new distribution;
  • adding an OS declaration, such as a microphone usage string or manifest permission;
  • adopting a new native capability.

Branding, knowledge, tools, voice availability and human handoff are workspace settings, so they never need a release. Locale and appearance follow the supported hosted chat parameters; the SDKs add no native flags for them.

3. Load the chat

Load the chat URL supplied for your mate and keep its supported query parameters. Set the channel that matches the platform:

PlatformChannelWhere the chat sits
iOSchannel=iosIn your WKWebView.
Androidchannel=androidIn your WebView.
Desktop SDKschannel=desktop_sdkAs the window's top-level page.

Use desktop_sdk for every desktop window. channel=embed is for a chat iframed inside a web page and refuses to start without an allowed parent page. channel=desktop is reserved for the Busymate AI desktop app. A channel parameter alone never identifies a customer.

Allow only exact HTTPS origins, with no wildcards. The SDK adds your mate's own origin. Add https://busymate.ai when you load a /chat/w/<assistant> URL, add your mapped support host if you have one, and include the frame origin when your page embeds the chat.

4. Connect your account

The identity token always comes from your backend. The app holds no signing key.

  1. The SDK asks your mint callback for a token for a nonce it supplies.
  2. Your backend signs a fresh ES256 launch token for that nonce, with a unique jti and an expiry within 120 seconds.
  3. Return no identity when the customer is signed out, and never cache or log a token.
  4. Tell the SDK after login, logout and account switches (accountChanged() or your platform's equivalent). Foreground resume is observed for you.
  5. Configure onClose to dismiss your chat view, and leave it unset when host dismissal is disabled.

See backend signing for the endpoint and Recognize signed-in customers for the whole flow. Existing v1 integrations keep working; they are compatibility paths, not install instructions for a new app (see native bridge compatibility).

5. Enable the microphone

Declare the OS microphone permission where your platform needs one, and install the microphone adapter once before the first load. The first mic or voice tap sends busymate.microphone.v1.request with a correlated id and a source of dictation or voice. The adapter asks the OS and replies with the same id and a granted boolean. Chat waits for that reply before it captures audio or mints a voice token.

Opening the chat never asks for permission. Denial, cancellation and timeout stop activation, and a delayed grant cannot start a cancelled session. After the customer changes the permission in system settings, they tap again. The adapter grants audio only, and only to an allowed origin.

The adapter ships inside each SDK. Every SDK release on GitHub also attaches its source with a checksum file, and each platform guide links the exact files.

6. Artifacts and versions

The identity contract is the frozen bridge contract v2. Its CONTRACT-v2.md hashes to c891b8bae48c87d5ae901de16df0594ba3879dd84ecd535e79120761d4220c1d, the entry in https://busymate.ai/sdk/v2/2.0.0/SHA256SUMS. Each repository's release-manifest.json pins its source hashes, and a change to those bytes is always a new SDK version.

7. Run the demo apps

Each repository's example-app/ has a settings screen for the chat URL, locale, assistant, exact origins, account, backend endpoint, microphone and action callbacks, plus guest and account controls and an event log that never shows credentials. Guest chat needs no fake identity. Authenticated cases need your real backend, and provider availability depends on your workspace.

The chat handles its own composer keyboard inset, so avoid extra native keyboard padding. Keep the chat host out of any proxy or VPN tunnel that would loop traffic, and test safe areas and audio routing in your host app.

Verify

  1. Build the demo app, open chat signed out and send a guest message.
  2. Load ?channel=desktop_sdk&locale=de on a desktop SDK: the first frame is in German and fills the window.
  3. Connect your backend, sign in and switch accounts; customer history must not cross accounts.
  4. On a physical device or real machine, tap dictation and voice separately. Test first grant, denial, retry after changing the OS setting, and cancellation while the prompt is open.
  5. Test external links, close, background and resume, and renderer recovery.
  6. Enable handoff in your workspace, request a human and check the Inbox.

Next steps

질문

Which SDK should a new app install?

The one for your platform: every SDK at distribution 1.0.5.

Where does the identity token come from?

Your authenticated backend signs it for the current request. The app contains no signing key.

Can I start with guest chat?

Yes, when your workspace permits guest access. Add identity once your backend is ready.

Do hosted updates replace app releases?

No. Hosted chat improvements arrive from the service, while SDK upgrades, OS declarations and new native capabilities need your own release.