LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

iOS reference

iOS API overview

The iOS SDK provides Swift- and Objective-C-friendly access to Lanying Chat through the shared BMX object model, with services for users, conversations, contacts, groups, push notifications, and voice & video.

Architecture and entry point

BMXClient is the application-level entry point. Configure it once, then obtain specialised services from the client and attach protocol-based listeners to the services whose lifecycle your application owns.

Reference map

Choose the narrowest reference for your task. Each item links to the locally hosted generated API page.

Recommended integration flow

  1. Create the SDK configuration with the App ID, storage paths, network settings, and log level.
  2. Initialise one BMXClient and retain listener objects for as long as their services are active.
  3. Sign in with a backend-issued user token and wait for the user-service callback before loading chat state.
  4. Use BMXConversation and BMXMessage as the shared model for history, unread state, attachments, and delivery status.
  5. Unregister listeners and stop active voice & video resources during logout or application teardown.

What to keep in mind

  • Classes contain callable APIs and models; Protocols contain listener callbacks; Constants contain enums and error codes.
  • Swift names may be imported differently from their Objective-C declarations, so confirm the generated signature for the language in use.
  • Listener ownership matters: retain listeners while registered and remove them before their owner is released.

Continue reading

Generated API content with concise AI notes where context helps.