### Install Sceyt Chat UIKit with CocoaPods Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Steps to integrate Sceyt Chat UIKit into an iOS project using CocoaPods, including Podfile configuration and installation command. ```bash pod init ``` ```ruby platform :ios, '13.0' # Specify your minimum iOS version if different target 'YourApp' do use_frameworks! # Add Sceyt Chat UIKit as a dependency pod 'SceytChatUIKit', :git => 'https://github.com/sceyt/sceyt-chat-ios-uikit.git' end ``` ```bash pod install ``` -------------------------------- ### Connect to Sceyt Chat API Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Code example showing how to establish a connection to the Sceyt Chat API using an access token after initializing the UIKit. ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ... // The user's access token for the Sceyt Chat API. let accessToken = "USER_ACCESS_TOKEN" SceytChatUIKit.shared.connect(token: accessToken) return true } ``` -------------------------------- ### Install Sceyt Chat UIKit with Swift Package Manager Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Instructions for adding the Sceyt Chat UIKit to an Xcode project using the Swift Package Manager. ```swift https://github.com/sceyt/sceyt-chat-ios-uikit.git ``` -------------------------------- ### Initialize Sceyt Chat UIKit Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Code snippet demonstrating how to initialize the Sceyt Chat UIKit in an iOS application's AppDelegate with the API URL and Application ID. ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // The URL of the Sceyt Chat application where UIKit app connects.         let apiUrl = "API_URL" // The ID of the Sceyt Chat application used by the UIKit app.         let appId = "APP_ID" SceytChatUIKit.initialize(apiUrl: apiUrl, appId: appId)         return true     } ``` -------------------------------- ### Basic Appearance Customization Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Demonstrates how to customize fonts, colors, and icons of the Sceyt Chat UIKit during initialization. This includes setting custom fonts, changing accent colors, and replacing default icons. ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ... SceytChatUIKit.initialize(apiUrl: apiUrl, appId: appId) ... // To change the fonts used in the UIKit, you can use the `Appearance.Fonts` property. // For example, to set a custom font: Appearance.Fonts.regular = UIFont(name: "CUSTOM_FONT", size: 10) // Customizing colors is straightforward with the Appearance.Colors property. // FOr instance to change only the accent color: SceytChatUIKit.shared.theme.colors = .init(accent: .blue) // You can also replace icons or images by using the Appearance.Images property. // For example, to change the chat action camera icon: Appearance.Images.chatActionCamera = UIImage(named: "camera") return true } ``` -------------------------------- ### Customizing Channel Cell Components Source: https://github.com/sceyt/sceyt-chat-ios-uikit/blob/main/README.md Shows how to replace default UIKit components with custom subclasses, specifically demonstrating how to customize a `ChannelCell`. This includes overriding `setupAppearance` for visual changes and `deliveryStatusImage` for custom message status icons. ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ... SceytChatUIKit.Components.channelCell = DemoChannelCell.self ... return true } ``` ```swift class DemoChannelCell: ChannelCell { override func setupAppearance() { super.setupAppearance() dateLabel.textColor = .green subjectLabel.font = UIFont.systemFont(ofSize: 14) } override func deliveryStatusImage(message: ChatMessage?) -> UIImage? { guard let message = message, !message.incoming else { return nil } switch message.deliveryStatus { case .pending: return UIImage(named: "pendingMessage") case .sent: return UIImage(named: "sentMessage") case .received: return UIImage(named: "deliveredMessage") case .displayed: return UIImage(named: "readMessage") case .failed: return UIImage(named: "failedMessage") } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.