> For the complete documentation index, see [llms.txt](https://chat-sdk.gitbook.io/chat-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chat-sdk.gitbook.io/chat-sdk/commercial/adding-modules-from-source.md).

# Adding Modules from source

## iOS

To add an iOS module from source, do the following.&#x20;

1. Unzip the module archive to a known location on your system. We will use the path to the module folder later
2. Add  the licensing pod to your Podspec:

```
    pod "Licensing", :path => "Path to module folder"
```

3\. Add the module pod:

```
 pod "MessageModules/StickerMessage", :path => "Path to module folder"
 pod "MessageModules/VideoMessage", :path => "Path to module folder"
 pod "MessageModules/AudioMessage", :path => "Path to module folder"
 pod "MessageModules/KeyboardOverlayOptions", :path => "Path to module folder"
 pod "MessageModules/FileMessage", :path => "Path to module folder"
    
 pod "FirebaseModules/FirebaseBlocking", :path => "Path to module folder"
 pod "FirebaseModules/FirebaseLastOnline", :path => "Path to module folder"
 pod "FirebaseModules/FirebaseTypingIndicator", :path => "Path to module folder"
 pod "FirebaseModules/FirebaseReadReceipts", :path => "Path to module folder"
 pod "FirebaseNearbyUsersModule/FirebaseNearbyUsers", :path => "Path to module folder"

 pod "ContactBookModule/ContactBook", :path => "Path to module folder"
 pod "EncryptionModule/Encryption", :path => "Path to module folder"

 pod "ChatSDKXMPP/XMPPAdapter", :path => "Path to module folder"
 pod "ChatSDKXMPP/XMPPReadReceipts", :path => "Path to module folder"
```

4\. Run pod install\
5\. Import the module in your app delegate:

```
import MessageModules
import FirebaseModules
import ContactBookModule
...
```

6\. Enable the module:

```
let modules = [
    // Other ChatSDK dependencies
    ...
    BBlockingModule.init(),
    BReadReceiptsModule.init(),
    BTypingIndicatorModule.init(),
    BLastOnlineModule.init(),
    StickerMessageModule.shared(),
    BVideoMessageModule.init(),
    FileMessageModule.init(),
    BContactBookModule.init(),
    BAudioMessageModule.init(),
    BKeyboardOverlayOptionsModule.init(),
    BNearbyUsersModule.shared(),
    EncryptionModule.init(),
]
```

## Android

1. Unzip the archive to a known location
2. Open Android Studio
3. Click File -> New -> Import Module
4. Select the module directory
5. Enable the module. In your main application class add:

```
ChatSDK.builder()
    ...
    build()
    .addModule(FirebaseEncryptionModule.shared())
    .addModule(ContactBookModule.shared())
    .addModule(FileMessageModule.shared())
    .addModule(AudioMessageModule.shared())
    .addModule(StickerMessageModule.shared())
    .addModule(VideoMessageModule.shared())
    .addModule(FirebaseBlockingModule.shared())
    .addModule(FirebaseLastOnlineModule.shared())
    .addModule(FirebaseNearbyUsersModule.builder().build())
    .addModule(FirebaseReadReceiptsModule.shared())
    .addModule(FirebaseTypingIndicatorModule.shared())
    .build().activate...
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://chat-sdk.gitbook.io/chat-sdk/commercial/adding-modules-from-source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
