> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Directory Structure

> Overview of the CometChat UI Kit Builder directory layout for iOS — understand where to find and customize components, settings, and styles.

The exported UI Kit Builder code is organized in a standard iOS project structure. This guide helps you navigate the structure so you know exactly where to make changes.

<Tree>
  <File name="BuilderApp">
    <File name="AppDelegate.swift" description="App lifecycle and CometChat initialization" />

    <File name="SceneDelegate.swift" description="Scene lifecycle management" />

    <File name="AppConstants.swift" description="App constants and credentials" />

    <File name="FrameworkManager.swift" description="Framework initialization helper" />

    <File name="cometchat-builder-settings.json" description="Builder configuration file" />

    <File name="Info.plist" description="App configuration" />

    <Folder name="Assets.xcassets" description="Images, icons, and color assets" />

    <Folder name="Base.lproj" description="Storyboards and launch screen" />

    <Folder name="Helper" description="Utility classes and extensions" />

    <Folder name="View Controllers" description="UI view controllers">
      <Folder name="CometChat Components" description="CometChat UI component wrappers" />

      <Folder name="LoginVC" description="Login and authentication views" />
    </Folder>
  </File>
</Tree>

***

## Root Files

| File                              | Purpose                                                               |
| --------------------------------- | --------------------------------------------------------------------- |
| `AppDelegate.swift`               | App lifecycle, CometChat initialization, and Builder settings loading |
| `SceneDelegate.swift`             | Scene lifecycle management for iOS 13+                                |
| `AppConstants.swift`              | CometChat credentials (APP\_ID, AUTH\_KEY, REGION)                    |
| `FrameworkManager.swift`          | Helper for initializing CometChat framework                           |
| `cometchat-builder-settings.json` | Builder configuration with feature flags, layout, and styling         |

***

## Key Folders

### `Assets.xcassets/`

Contains all image and color assets for the app.

<Tree>
  <Folder name="Assets.xcassets">
    <Folder name="AccentColor.colorset" description="App accent color" />

    <Folder name="AppIcon.appiconset" description="App icons for all sizes" />

    <Folder name="cometchat-logo.imageset" description="CometChat logo assets" />

    <Folder name="emptyChatState.imageset" description="Empty state illustrations" />
  </Folder>
</Tree>

### `Base.lproj/`

Contains storyboards and localization base files.

<Tree>
  <Folder name="Base.lproj">
    <File name="LaunchScreen.storyboard" description="App launch screen" />
  </Folder>
</Tree>

### `Helper/`

Utility classes and Swift extensions.

<Tree>
  <Folder name="Helper">
    <File name="CustomTextFiled.swift" description="Custom text field component" />

    <File name="Extentions.swift" description="Swift extensions (UIColor, etc.)" />
  </Folder>
</Tree>

### `View Controllers/`

All view controllers organized by feature.

<Tree>
  <Folder name="View Controllers">
    <File name="HomeScreenViewController.swift" description="Main home screen" />

    <File name="SplitScreenViewController.swift" description="Split view for iPad" />

    <Folder name="CometChat Components" description="CometChat UI wrappers">
      <File name="MessagesVC.swift" description="Messages screen" />

      <File name="ThreadedMessagesVC.swift" description="Threaded messages" />

      <File name="CreateConversations.swift" description="New conversation" />

      <Folder name="Add Members" description="Add members to group" />

      <Folder name="Banned Members" description="Banned members list" />

      <Folder name="Call Log Details" description="Call log details" />

      <Folder name="DetailsPage" description="User/Group details" />

      <Folder name="Group Component" description="Group-related views" />

      <Folder name="Transfer ownership" description="Transfer group ownership" />
    </Folder>

    <Folder name="LoginVC" description="Login screens">
      <File name="LoginWithUidVC.swift" description="UID login" />

      <File name="ChangeAppCredentialsVC.swift" description="Change credentials" />

      <File name="SampleUserCVCell.swift" description="Sample user cell" />
    </Folder>
  </Folder>
</Tree>

***

## Configuration Files

### `cometchat-builder-settings.json`

The main configuration file containing all Builder settings:

```json theme={null}
{
  "builderId": "your-builder-id",
  "settings": {
    "chatFeatures": { ... },
    "callFeatures": { ... },
    "layout": { ... },
    "style": { ... }
  }
}
```

### `AppConstants.swift`

Contains CometChat credentials:

```swift theme={null}
struct AppConstants {
    static let APP_ID = "YOUR_APP_ID"
    static let AUTH_KEY = "YOUR_AUTH_KEY"
    static let REGION = "YOUR_REGION"
}
```

***

## Quick Reference: Where to Customize

| What you want to change  | Where to look                                            |
| ------------------------ | -------------------------------------------------------- |
| Enable/disable features  | `cometchat-builder-settings.json`                        |
| CometChat credentials    | `AppConstants.swift`                                     |
| Theme colors & styles    | `cometchat-builder-settings.json` → `style` section      |
| App icons                | `Assets.xcassets/AppIcon.appiconset/`                    |
| Launch screen            | `Base.lproj/LaunchScreen.storyboard`                     |
| Messages screen behavior | `View Controllers/CometChat Components/MessagesVC.swift` |
| Login flow               | `View Controllers/LoginVC/`                              |
| Home screen layout       | `View Controllers/HomeScreenViewController.swift`        |
| Custom UI extensions     | `Helper/Extentions.swift`                                |

<Note>
  Prefer using `cometchat-builder-settings.json` for feature toggles and styling. For extensive changes, extend existing view controllers instead of modifying core files directly.
</Note>

***

## CometChat Components

The `CometChat Components` folder contains wrappers around CometChat UI Kit components:

| Component           | File                        | Purpose                    |
| ------------------- | --------------------------- | -------------------------- |
| Messages            | `MessagesVC.swift`          | Main messaging interface   |
| Threaded Messages   | `ThreadedMessagesVC.swift`  | Thread view for replies    |
| Create Conversation | `CreateConversations.swift` | Start new conversations    |
| Add Members         | `Add Members/`              | Add users to groups        |
| Banned Members      | `Banned Members/`           | View/manage banned users   |
| Call Log Details    | `Call Log Details/`         | Call history details       |
| Details Page        | `DetailsPage/`              | User/Group profile details |
| Group Component     | `Group Component/`          | Group management views     |
| Transfer Ownership  | `Transfer ownership/`       | Transfer group ownership   |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="UI Kit Builder Settings" href="/chat-builder/ios/builder-settings">
    Configure feature toggles and behavior
  </Card>

  <Card title="Customizations" href="/chat-builder/ios/builder-customisations">
    Modify component props, styling, and behavior
  </Card>

  <Card title="Theming" href="/ui-kit/ios/theme-introduction">
    Customize colors, typography, and styling
  </Card>

  <Card title="Components Overview" href="/ui-kit/ios/overview">
    Explore all available UI components
  </Card>
</CardGroup>
