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.
BMXClientSDK initialisation, connection lifecycle, authentication, and service accessors.BMXChatServiceConversations, message delivery, history, attachments, receipts, and recall.BMXRosterServiceContacts, friend applications, relationships, and block lists.BMXGroupServiceGroups, membership, roles, invitations, moderation, and shared files.BMXPushServiceAPNs token registration, aliases, and push service state.BMXRTCServiceVoice & video rooms, streams, engine configuration, and session callbacks.Recommended integration flow
- Create the SDK configuration with the App ID, storage paths, network settings, and log level.
- Initialise one BMXClient and retain listener objects for as long as their services are active.
- Sign in with a backend-issued user token and wait for the user-service callback before loading chat state.
- Use BMXConversation and BMXMessage as the shared model for history, unread state, attachments, and delivery status.
- 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.