# infobip/mobile-messaging-sdk-ios architecture

> Architecture diagram of the GitHub repository infobip/mobile-messaging-sdk-ios, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/infobip/mobile-messaging-sdk-ios
- Repository: https://github.com/infobip/mobile-messaging-sdk-ios

## Overview

This is an iOS Mobile Messaging SDK: an app initializes the service, which registers for push and supports messaging-related capabilities. The repository also contains Live Chat, Inbox, interactive notifications, and WebRTC calling. The graph keeps those product stages distinct and includes core networking and storage layers. Some subsystem paths come from the file tree and are not sampled; their links are omitted or marked unverified rather than inferred as confirmed calls.

Main entry points: [`Classes/MobileMessaging/Core/MobileMessaging.swift`](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/MobileMessaging.swift) (SDK Facade), [`Classes/Chat/ChatCore/ChatWebViewHandler.swift`](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/ChatCore/ChatWebViewHandler.swift) (Chat Handler), [`Classes/WebRTCUI/MMWebRTCService.swift`](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/MMWebRTCService.swift) (WebRTC Service), [`Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift`](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift) (Message Storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["SDK Lifecycle"]
  node_sdk["SDK Facade"]
  node_service["Messaging Service"]
  node_registration["Push Registration"]
end

subgraph group_messaging["Messaging Core"]
  node_remote["Remote API"]
  node_messageops["Message Operations"]
  node_message["Message Model<br/>[Message.swift]"]
  node_message_store[("Message Storage")]
  node_core_store[("Core Data Store")]
end

subgraph group_engagement["User Engagement"]
  node_inbox["Inbox Service"]
  node_inbox_model["Inbox Messages<br/>[MMInbox.swift]"]
  node_interactive["Interactive Notifications"]
  node_notification_ext["Notification Extension"]
  node_shared_receipts[("Shared Receipts")]
end

subgraph group_chat["Live Chat"]
  node_chat_ui["Chat Screen"]
  node_chat_handler["Chat Handler"]
  node_chat_webview["Chat Web View<br/>[ChatWebView.swift]"]
  node_chat_widget["Chat Widget<br/>[ChatWidget.swift]"]
end

subgraph group_calling["WebRTC Calling"]
  node_call_service["WebRTC Service"]
  node_call_ui["Call UI"]
  node_call_settings["Call Settings"]
  node_call_token["WebRTC Token"]
end

node_app(("Host App"))

node_app -->|"starts"| node_sdk
node_sdk -.->|"registers device"| node_registration
node_sdk -.->|"starts services"| node_service
node_messageops -.->|"fetches messages"| node_remote
node_message_store -->|"stores"| node_message
node_message_store -->|"uses storage"| node_core_store
node_inbox -.->|"requests inbox"| node_remote
node_inbox -->|"returns messages"| node_inbox_model
node_notification_ext -->|"updates receipts"| node_shared_receipts
node_chat_ui -->|"delegates chat"| node_chat_handler
node_chat_ui -->|"embeds view"| node_chat_webview
node_chat_handler -->|"sends commands"| node_chat_webview
node_chat_handler -->|"loads widget"| node_chat_widget
node_call_service -->|"uses token"| node_call_token
node_call_service -->|"uses settings"| node_call_settings
node_call_ui -.->|"controls calls"| node_call_service

click node_sdk "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/MobileMessaging.swift"
click node_service "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/MobileMessagingService/MobileMessagingService.swift"
click node_registration "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/Utils/ApnsRegistrationManager.swift"
click node_remote "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/HTTP/RemoteAPIProvider.swift"
click node_messageops "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/Operations/AppOperations/MessageFetchingOperation.swift"
click node_message "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/MessageStorage/Message.swift"
click node_message_store "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift"
click node_core_store "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/InternalStorage/MMCoreDataStorage.swift"
click node_inbox "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Inbox/MMInboxService.swift"
click node_inbox_model "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Inbox/MMInbox.swift"
click node_interactive "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/InteractiveNotifications/MessageAlert/InteractiveMessageAlertManager.swift"
click node_notification_ext "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/NotificationExtension/MobileMessagingNotificationServiceExtension.swift"
click node_shared_receipts "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/NotificationExtension/MMNSESharedStorage.swift"
click node_chat_ui "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/UI/ChatViewController.swift"
click node_chat_handler "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/ChatCore/ChatWebViewHandler.swift"
click node_chat_webview "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/WebView/ChatWebView.swift"
click node_chat_widget "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/ChatWidget.swift"
click node_call_service "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/MMWebRTCService.swift"
click node_call_ui "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/UI/CallUI/MMCallController.swift"
click node_call_settings "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/MMWebRTCSettings.swift"
click node_call_token "https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/Models/MMWebRTCToken.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sdk,node_service,node_registration toneBlue
class node_remote,node_messageops,node_message,node_message_store,node_core_store toneAmber
class node_inbox,node_inbox_model,node_interactive,node_notification_ext,node_shared_receipts toneMint
class node_chat_ui,node_chat_handler,node_chat_webview,node_chat_widget toneRose
class node_call_service,node_call_ui,node_call_settings,node_call_token,node_app toneIndigo
```

## Components

### SDK Lifecycle

- [SDK Facade](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/MobileMessaging.swift): `Classes/MobileMessaging/Core/MobileMessaging.swift`
- [Messaging Service](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/MobileMessagingService/MobileMessagingService.swift): `Classes/MobileMessaging/Core/MobileMessagingService/MobileMessagingService.swift`
- [Push Registration](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/Utils/ApnsRegistrationManager.swift): `Classes/MobileMessaging/Core/Utils/ApnsRegistrationManager.swift`

### Messaging Core

- [Remote API](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/HTTP/RemoteAPIProvider.swift): `Classes/MobileMessaging/Core/HTTP/RemoteAPIProvider.swift`
- [Message Operations](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/Operations/AppOperations/MessageFetchingOperation.swift): `Classes/MobileMessaging/Core/Operations/AppOperations/MessageFetchingOperation.swift`
- [Message Model](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/MessageStorage/Message.swift): `Classes/MobileMessaging/MessageStorage/Message.swift`
- [Message Storage](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift): `Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift`
- [Core Data Store](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/Core/InternalStorage/MMCoreDataStorage.swift): `Classes/MobileMessaging/Core/InternalStorage/MMCoreDataStorage.swift`

### User Engagement

- [Inbox Service](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Inbox/MMInboxService.swift): `Classes/Inbox/MMInboxService.swift`
- [Inbox Messages](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Inbox/MMInbox.swift): `Classes/Inbox/MMInbox.swift`
- [Interactive Notifications](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/MobileMessaging/InteractiveNotifications/MessageAlert/InteractiveMessageAlertManager.swift): `Classes/MobileMessaging/InteractiveNotifications/MessageAlert/InteractiveMessageAlertManager.swift`
- [Notification Extension](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/NotificationExtension/MobileMessagingNotificationServiceExtension.swift): `Classes/NotificationExtension/MobileMessagingNotificationServiceExtension.swift`
- [Shared Receipts](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/NotificationExtension/MMNSESharedStorage.swift): `Classes/NotificationExtension/MMNSESharedStorage.swift`

### Live Chat

- [Chat Screen](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/UI/ChatViewController.swift): `Classes/Chat/UI/ChatViewController.swift`
- [Chat Handler](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/ChatCore/ChatWebViewHandler.swift): `Classes/Chat/ChatCore/ChatWebViewHandler.swift`
- [Chat Web View](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/WebView/ChatWebView.swift): `Classes/Chat/WebView/ChatWebView.swift`
- [Chat Widget](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/Chat/ChatWidget.swift): `Classes/Chat/ChatWidget.swift`

### WebRTC Calling

- [WebRTC Service](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/MMWebRTCService.swift): `Classes/WebRTCUI/MMWebRTCService.swift`
- [Call UI](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/UI/CallUI/MMCallController.swift): `Classes/WebRTCUI/UI/CallUI/MMCallController.swift`
- [Call Settings](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/MMWebRTCSettings.swift): `Classes/WebRTCUI/MMWebRTCSettings.swift`
- [WebRTC Token](https://github.com/infobip/mobile-messaging-sdk-ios/blob/master/Classes/WebRTCUI/Models/MMWebRTCToken.swift): `Classes/WebRTCUI/Models/MMWebRTCToken.swift`

### Other components

- **Host App**

## Connections

- Host App → SDK Facade: starts
- SDK Facade → Push Registration: registers device (evidence: `Classes/MobileMessaging/Core/MobileMessaging.swift`)
- SDK Facade → Messaging Service: starts services (evidence: `Classes/MobileMessaging/Core/MobileMessaging.swift`)
- Message Operations → Remote API: fetches messages
- Message Storage → Message Model: stores (evidence: `Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift`)
- Message Storage → Core Data Store: uses storage (evidence: `Classes/MobileMessaging/MessageStorage/MMDefaultMessageStorage.swift`)
- Inbox Service → Remote API: requests inbox
- Inbox Service → Inbox Messages: returns messages (evidence: `Classes/Inbox/MMInboxService.swift`)
- Notification Extension → Shared Receipts: updates receipts (evidence: `Classes/NotificationExtension/MobileMessagingNotificationServiceExtension.swift`)
- Chat Screen → Chat Handler: delegates chat (evidence: `Classes/Chat/UI/ChatViewController.swift`)
- Chat Screen → Chat Web View: embeds view (evidence: `Classes/Chat/UI/ChatViewController.swift`)
- Chat Handler → Chat Web View: sends commands (evidence: `Classes/Chat/ChatCore/ChatWebViewHandler.swift`)
- Chat Handler → Chat Widget: loads widget (evidence: `Classes/Chat/ChatCore/ChatWebViewHandler.swift`)
- WebRTC Service → WebRTC Token: uses token (evidence: `Classes/WebRTCUI/MMWebRTCService.swift`)
- WebRTC Service → Call Settings: uses settings (evidence: `Classes/WebRTCUI/MMWebRTCService.swift`)
- Call UI → WebRTC Service: controls calls
