### Verify SDK Installation
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Import the module in a Swift file to confirm the SDK is correctly linked.
```swift
import ChannelIOSDK
// If build succeeds, installation is complete
```
--------------------------------
### Basic Initialization Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Framework setup should occur early in the application lifecycle, typically within AppDelegate or App.swift.
```swift
import ChannelIOSDK
// Initialize the framework early in app lifecycle
// Typically in AppDelegate or App.swift
// Configuration is performed through framework-specific methods
// Refer to official documentation for specific initialization APIs
```
--------------------------------
### Compliance Notice Example
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Example of a compliant software notice for the Channel Talk iOS Framework.
```text
This software includes the Channel Talk iOS Framework
Copyright 2023-present Channel Talk
Licensed under the Apache License, Version 2.0.
You may not use this file except in compliance with the License.
A copy of the License is available at:
https://www.apache.org/licenses/LICENSE-2.0
```
--------------------------------
### Define Version Constraints
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/installation-and-setup.md
Examples of various versioning strategies for the Swift Package Manager dependency.
```swift
// Exact version
from: "13.2.1"
// Minimum version with patch updates
from: "13.0.0"
// Range
"13.0.0"..<"14.0.0"
// Branch reference
.branch("master")
```
--------------------------------
### Integrate Channel Talk in AppDelegate
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Standard setup for initializing the SDK and handling remote notifications within the UIApplicationDelegate.
```swift
import UIKit
import ChannelIOSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions options: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Initialize Channel Talk SDK
// Configuration methods available from ChannelIOFront framework
return true
}
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// Handle Channel Talk notifications
// Forward to SDK as needed
completionHandler(.newData)
}
}
```
--------------------------------
### Define the complete Package.swift configuration
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
The full manifest file defining the package structure, platforms, products, and targets.
```swift
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "ChannelIOSDK",
platforms: [
.iOS(.v15),
],
products: [
.library(
name: "ChannelIOSDK",
targets: ["ChannelIOFront", "_ChannelIOSDKTarget"]),
],
targets: [
.binaryTarget(
name: "ChannelIOFront",
url: "https://mobile-static.channel.io/ios/13.2.1/spm-xcframework.zip",
checksum: "708070f3973b42d388fe3251c75444422dd38ef21a61c94b8e05a63e8b2b8e2f"
),
.target(name: "_ChannelIOSDKTarget")
],
swiftLanguageVersions: [.v5]
)
```
--------------------------------
### Navigate Repository via Command Line
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Common shell commands for exploring the repository structure and configuration files.
```bash
cd channel-talk-ios-framework/
# View package configuration
cat Package.swift
# View documentation
cat README.md
cat CHANGELOG.md
# View license
cat LICENSE
# View source files
ls -la Sources/
# Check git history
git log --oneline | head -20
```
--------------------------------
### Framework Access Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Demonstrates the standard import structure for accessing client initialization, messaging, and UI presentation APIs.
```swift
// Example structure (specific APIs available in framework)
import ChannelIOSDK
// The framework provides:
// - Client initialization functions
// - Message sending APIs
// - User management functions
// - UI presentation methods
// - Event delegates and callbacks
```
--------------------------------
### Framework Initialization Lifecycle
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
The sequence of steps required to initialize the framework during application launch.
```text
App Launch
↓
Import ChannelIOSDK (loads ChannelIOFront)
↓
Initialize Framework
↓
Set User Information
↓
Ready to Use
```
--------------------------------
### Integrate via Package.swift
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Configuration snippet for adding the framework as a dependency in a Package.swift file.
```swift
.package(
url: "https://github.com/channel-io/channel-talk-ios-framework.git",
from: "13.2.1"
)
```
--------------------------------
### Copy License File
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Use this command to copy the license file into your project directory.
```bash
# Copy license to your project
cp LICENSE LICENSE-ChannelIOSDK
```
--------------------------------
### Standard SDK Usage
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
Recommended pattern for utilizing the SDK, ensuring interaction only with the transparent ChannelIOFront APIs.
```swift
import ChannelIOSDK
// Use actual SDK APIs from ChannelIOFront
// The stub target is transparent
```
--------------------------------
### Inspect Framework Directory Structure
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Displays the internal file hierarchy of the ChannelIOFront.xcframework, including device and simulator binaries.
```text
ChannelIOFront.xcframework/
├── Info.plist # Framework metadata
├── ios-arm64/
│ └── ChannelIOFront.framework/
│ ├── ChannelIOFront # Binary executable
│ ├── Headers/
│ │ └── (Public headers)
│ ├── Modules/
│ │ └── module.modulemap
│ ├── Resources/
│ │ └── (Asset files)
│ └── Info.plist
└── ios-arm64_x86_64-simulator/
└── ChannelIOFront.framework/
├── ChannelIOFront
├── Headers/
├── Modules/
├── Resources/
└── Info.plist
```
--------------------------------
### Retrieve Version Information
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Provides the current release version, download URL, and SHA256 checksum for the framework.
```text
Current Release: 13.2.1
Download URL: https://mobile-static.channel.io/ios/13.2.1/spm-xcframework.zip
Checksum (SHA256): 708070f3973b42d388fe3251c75444422dd38ef21a61c94b8e05a63e8b2b8e2f
```
--------------------------------
### Verify Xcode SDKs
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/installation-and-setup.md
Use this command to confirm that the Xcode environment recognizes the available SDKs.
```bash
xcodebuild -showsdks
```
--------------------------------
### Configure App Integration Points
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Placeholder comments for configuring the SDK within the AppDelegate or main application lifecycle.
```swift
// Configure in app initialization
// Handle notifications
// Manage lifecycle events
```
--------------------------------
### Reference Current Version and URL
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Displays the current framework version and the corresponding download URL structure for the SPM XCFramework.
```text
Version: 13.2.1
URL Structure: https://mobile-static.channel.io/ios/{version}/spm-xcframework.zip
Current: https://mobile-static.channel.io/ios/13.2.1/spm-xcframework.zip
```
--------------------------------
### Retrieve Binary Framework URL
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/overview.md
The location of the pre-compiled XCFramework for the current SDK version.
```text
https://mobile-static.channel.io/ios/{version}/spm-xcframework.zip
```
--------------------------------
### Add Copyright Notice
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Include this notice in your project's README file to satisfy attribution requirements.
```markdown
This project includes Channel Talk iOS Framework
Copyright 2023-present Channel Talk
Licensed under Apache License 2.0
```
--------------------------------
### Configure platform support
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Sets the minimum iOS deployment target to 15.0.
```swift
platforms: [
.iOS(.v15),
],
```
--------------------------------
### View Build Target Structure
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Visual representation of the ChannelIOSDK product and its associated targets.
```text
Product: ChannelIOSDK
├── Target: ChannelIOFront (binary)
│ └── Framework from: https://mobile-static.channel.io/...
└── Target: _ChannelIOSDKTarget (stub)
└── Source: Sources/_ChannelIOSDKTarget/
```
--------------------------------
### Error Handling Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Demonstrates the recommended Swift pattern for catching and handling framework-specific errors.
```swift
do {
// Framework operations
} catch let error as ChannelIOError {
// Handle specific error types
print("Channel IO Error: \(error.message)")
} catch {
// Handle other errors
}
```
--------------------------------
### Configure Info.plist Permissions
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Required keys for accessing device hardware and libraries. Add these to your Info.plist file to prevent crashes when requesting access.
```xml
NSCameraUsageDescription
Camera access needed to send photos and videos
```
```xml
NSMicrophoneUsageDescription
Microphone access needed for voice messages
```
```xml
NSPhotoLibraryUsageDescription
Photo library access needed to send images
```
```xml
NSContactsUsageDescription
Contacts access for sharing contact information
```
--------------------------------
### Xcode Build Commands
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Commands for cleaning and building the project for development or release.
```bash
# Clean build
xcodebuild clean
# Build for development
xcodebuild -scheme YourApp -configuration Debug build
```
```bash
# Build for release
xcodebuild -scheme YourApp -configuration Release build
# Alternatively, via Xcode UI
# Product → Build for → Running
```
--------------------------------
### Troubleshooting Commands
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Common shell commands used to resolve build and dependency issues.
```bash
rm -rf ~/Library/Developer/Xcode/DerivedData
```
```bash
rm -rf ~/Library/Caches/org.swift.swiftpm
```
--------------------------------
### Import SDK
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/overview.md
Import the module into your Swift files to access the SDK functionality.
```swift
import ChannelIOSDK
```
--------------------------------
### View Directory Layout
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Visual representation of the project's root directory structure.
```text
channel-talk-ios-framework/
├── .git/ # Git repository metadata
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── CHANGELOG.md # Release notes and history
├── LICENSE # Apache 2.0 license
├── Package.swift # Swift Package Manager manifest
└── Sources/
├── ChannelIOSDK/
│ └── ChannelIOSDK.swift # Entry point (empty)
└── _ChannelIOSDKTarget/
└── _ChannelIOSDKTarget.swift # Stub target
```
--------------------------------
### Integrate via Swift Package Manager
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/overview.md
Add the Channel Talk SDK dependency to your Package.swift file.
```swift
.package(url: "https://github.com/channel-io/channel-talk-ios-framework.git",
from: "13.2.1")
```
--------------------------------
### Memory Management for UI Components
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Demonstrates the use of weak references to avoid retain cycles when referencing UI components.
```swift
// Bad - retains UI reference
var chatVC: ChatViewController?
// Good - use weak references
weak var chatVC: ChatViewController?
```
--------------------------------
### Xcode Build Configuration Settings
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Displays the generated XCBuildConfiguration settings for the framework search paths and linker flags.
```text
XCBuildConfiguration:
FRAMEWORK_SEARCH_PATHS = $(inherited)
LD_FRAMEWORK_SEARCH_PATHS = $(inherited)
OTHER_LDFLAGS = $(inherited) -framework ChannelIOFront
```
--------------------------------
### Configure Minimum iOS Version in Info.plist
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Set the minimum deployment target requirement in the project's Info.plist file.
```xml
MinimumOSVersion
15.0
```
--------------------------------
### List Git Tags
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Displays the list of version tags available in the repository.
```text
13.2.1 (HEAD, master)
13.2.0
13.1.3
13.1.2
13.1.1
13.1.0
...
```
--------------------------------
### View Repository Structure
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/overview.md
The directory layout of the SPM package configuration repository.
```text
channel-talk-ios-framework/
├── Package.swift # SPM package configuration
├── README.md # Documentation reference
├── CHANGELOG.md # Version history and release notes
├── LICENSE # Apache 2.0 license
└── Sources/
├── ChannelIOSDK/
│ └── ChannelIOSDK.swift # Entry point (currently empty)
└── _ChannelIOSDKTarget/
└── _ChannelIOSDKTarget.swift # Stub target class
```
--------------------------------
### Pinning SDK Versions for Environments
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/version-history.md
Use these patterns to control SDK updates in your Swift package configuration.
```swift
from: "13.2.1" // Latest
```
```swift
"13.1.0"..<"14.0.0" // Patch and minor updates only
```
```swift
.exact("13.2.1") // Specific version
```
--------------------------------
### Archive for Distribution
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Command to archive the project for distribution.
```swift
// Xcode automatically includes frameworks
// Product → Archive
// Or via command line
xcodebuild -scheme YourApp -configuration Release archive
```
--------------------------------
### Define library products
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Specifies the library product and its associated targets.
```swift
products: [
.library(
name: "ChannelIOSDK",
targets: ["ChannelIOFront", "_ChannelIOSDKTarget"]),
],
```
--------------------------------
### Unit Testing SDK Integration
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Verifies that the Channel IO SDK is correctly imported and accessible within the test target.
```swift
import XCTest
import ChannelIOSDK
class ChannelIOTests: XCTestCase {
func testSDKImports() {
// If this compiles and runs, SDK is properly integrated
XCTAssertTrue(true)
}
}
```
--------------------------------
### Validate Package Manifest and Dependencies
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Commands to validate the manifest syntax and inspect the dependency graph.
```bash
# Validate manifest syntax
swift package describe
# Build and check dependencies
swift build --show-dependencies
```
--------------------------------
### Request Permissions at Runtime
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Requesting access to device features using AVFoundation, Photos, and Contacts frameworks.
```swift
import AVFoundation
import Photos
import Contacts
// Request camera permission
AVCaptureDevice.requestAccess(for: .video) { granted in
if granted {
// Camera access granted
}
}
// Request photo library permission
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// Photo library access granted
}
}
// Request contacts permission
CNContactStore().requestAccess(for: .contacts) { granted, error in
if granted {
// Contacts access granted
}
}
```
--------------------------------
### Version Upgrade Path
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/version-history.md
Diagram illustrating the progression between versions and the nature of changes during upgrades.
```text
13.0.0 → 13.1.0 (New features, safe upgrade)
↓
13.1.0 → 13.1.1 (Bug fixes only, safe upgrade)
↓
13.1.1 → 13.2.0 (New features, safe upgrade)
↓
13.2.0 → 14.0.0 (May have breaking changes, review changelog)
```
--------------------------------
### Define Package.swift Manifest
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Configuration for the Swift Package Manager, specifying platform requirements and binary targets.
```swift
// Minimum version specification
swift-tools-version:5.5
// Package definition
Package(
name: "ChannelIOSDK",
platforms: [.iOS(.v15)],
products: [.library(name: "ChannelIOSDK", ...)],
targets: [
.binaryTarget(name: "ChannelIOFront", ...),
.target(name: "_ChannelIOSDKTarget")
]
)
```
--------------------------------
### Implement Stub Target
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Minimal Swift source file used as a workaround for SPM binary target limitations.
```swift
import Foundation
class ChannelIOSDKTarget { }
```
--------------------------------
### Verify Downloaded File Checksum
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Command to verify the integrity of the downloaded xcframework zip file using shasum.
```bash
# Verify downloaded file
shasum -a 256 spm-xcframework.zip
# Expected output
708070f3973b42d388fe3251c75444422dd38ef21a61c94b8e05a63e8b2b8e2f spm-xcframework.zip
```
--------------------------------
### Warranty Disclaimer Clause
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
States that the software is provided on an 'AS IS' basis without any express or implied warranties.
```text
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied, including, without limitation, any warranties or conditions of
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
```
--------------------------------
### Module Map Configuration
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
The automatically generated module map for the target.
```text
module _ChannelIOSDKTarget {
header "ChannelIOSDKTarget-Swift.h"
requires objc
}
```
--------------------------------
### User Management Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Pattern for managing user profiles, updating information, and handling authentication states.
```swift
// Set user information
// Update user profile
// Handle authentication
```
--------------------------------
### Integrate Channel Talk in SwiftUI
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Implementation using UIApplicationDelegateAdaptor to bridge the SDK initialization within a SwiftUI App structure.
```swift
import SwiftUI
import ChannelIOSDK
@main
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions options: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Initialize SDK here
return true
}
}
```
--------------------------------
### Network Firewall Configuration
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Required domains to whitelist for SDK functionality.
```text
api.channel.io - API endpoints
*.channel.io - General services
ws.channel.io - WebSocket connections
cdn.channel.io - Asset delivery
mobile-static.channel.io - Package distribution (SPM only)
```
--------------------------------
### Commit Package.swift changes
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Stage and commit the updated Package.swift file after modifying the version URL and checksum.
```bash
git add Package.swift
git commit -m "Release X.Y.Z"
```
--------------------------------
### Handle Push Notifications
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Placeholder comments for forwarding and configuring push notification behavior.
```swift
// Forward remote notifications
// Handle notification tapping
// Configure notification appearance
```
--------------------------------
### UI Testing Messaging Presentation
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Template for testing the presentation of the messaging UI using XCUIApplication.
```swift
import XCTest
class ChannelIOUITests: XCTestCase {
func testMessagingUIPresentation() {
let app = XCUIApplication()
app.launch()
// Test that messaging UI can be opened
// Specific test code depends on SDK APIs used
}
}
```
--------------------------------
### Stub Target Implementation Note
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Explains the requirement for a stub target to ensure the binary framework is correctly exposed in the Xcode SPM integration list.
```swift
// NOTE: targets 안에 binaryTarget 하나만 존재할 경우 SPM Framework 추가 목록에 노출되지 않는 버그가 있어
// 이를 방지하기 위한 Stub target을 추가합니다 - finn. 2023.02.23
// Translation: "There is a bug where if only one binaryTarget exists in targets,
// it is not exposed in the SPM Framework addition list. To prevent this,
// we add a Stub target - finn. 2023.02.23"
```
--------------------------------
### Link Against ChannelIOSDK
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
The package product dependency declaration for linking the SDK.
```swift
.product(name: "ChannelIOSDK", package: "channel-talk-ios-framework")
```
--------------------------------
### Manage User Authentication
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Placeholder comments for handling user credentials and session states within the SDK.
```swift
// Provide user credentials
// Update user session
// Handle authentication state changes
```
--------------------------------
### Configure binary target
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Defines the binary target for the pre-compiled XCFramework with its download URL and checksum.
```swift
.binaryTarget(
name: "ChannelIOFront",
url: "https://mobile-static.channel.io/ios/13.2.1/spm-xcframework.zip",
checksum: "708070f3973b42d388fe3251c75444422dd38ef21a61c94b8e05a63e8b2b8e2f"
)
```
--------------------------------
### Tag and push release
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Apply a version tag to the repository and push the changes to the remote master branch.
```bash
git tag "X.Y.Z"
git push origin master --tags
```
--------------------------------
### Framework Shutdown Lifecycle
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
The sequence of steps performed during application termination to ensure clean state management.
```text
App Termination
↓
Cleanup Connections
↓
Save Local State
↓
Unload Framework
```
--------------------------------
### Framework Log Levels
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Available log levels for debugging and monitoring framework behavior.
```text
Debug - Verbose information for debugging
Info - General informational messages
Warning - Warning messages for potential issues
Error - Error messages for failures
```
--------------------------------
### Framework Base URLs and Endpoints
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
Lists the primary service endpoints and base URLs required for framework communication.
```text
Base URLs: *.channel.io
API Endpoints: https://api.channel.io/...
WebSocket: wss://ws.channel.io/...
Static Assets: https://cdn.channel.io/...
```
--------------------------------
### Library Product Composition
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
The library product definition including the stub target.
```swift
products: [
.library(
name: "ChannelIOSDK",
targets: ["ChannelIOFront", "_ChannelIOSDKTarget"])
]
```
--------------------------------
### Semantic Versioning Format
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/binary-framework.md
The versioning scheme used for framework releases.
```text
MAJOR.MINOR.PATCH
13.2.1
```
--------------------------------
### Lazy SDK Initialization
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Prevents redundant SDK initialization by checking the current state before execution.
```swift
class ChatManager {
static let shared = ChatManager()
private var isInitialized = false
func initialize() {
guard !isInitialized else { return }
// Initialize SDK
isInitialized = true
}
}
```
--------------------------------
### Retrieve Version-Specific Download URLs
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/version-history.md
List of direct download URLs for specific versions of the Channel Talk iOS framework.
```text
Version 13.2.1: https://mobile-static.channel.io/ios/13.2.1/spm-xcframework.zip
Version 13.2.0: https://mobile-static.channel.io/ios/13.2.0/spm-xcframework.zip
Version 13.1.3: https://mobile-static.channel.io/ios/13.1.3/spm-xcframework.zip
Version 13.0.0: https://mobile-static.channel.io/ios/13.0.0/spm-xcframework.zip
```
--------------------------------
### Recent Release Activity
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/version-history.md
List of recent commit hashes and their corresponding release versions.
```text
0b4551a - Release 13.2.1
8545679 - Release 13.2.0
ea15a2b - Release 13.1.3
79c4842 - Release 13.1.2
61645b9 - Release 13.1.1
c6305cd - Release 13.1.0
cfd3b20 - Release 13.0.8
0d22d9b - Release 13.0.7
e72e227 - Release 13.0.6
95d91b0 - Release 13.0.5
```
--------------------------------
### Define the package name
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
The public identifier for the package used when adding it as a dependency.
```swift
let package = Package(
name: "ChannelIOSDK",
...
)
```
--------------------------------
### Implement Swift Error Handling
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Use standard do-catch blocks to handle potential errors from SDK API calls.
```swift
do {
// SDK API calls
} catch {
// Handle error - specific error types depend on the operation
}
```
--------------------------------
### UI Integration Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Pattern for presenting the chat interface and managing UI lifecycle events.
```swift
// Present chat UI
// Handle UI lifecycle events
// Customize UI appearance (if supported)
```
--------------------------------
### Troubleshooting Error Messages
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Common error messages encountered during integration.
```text
error: failed to build module 'ChannelIOSDK'
```
```text
error: failed to fetch required binary artifacts
```
```text
Multiple definitions of symbol 'ChannelIOFront'
```
--------------------------------
### View Dependency Graph
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Visual representation of the internal dependency structure between the product, binary target, and stub target.
```text
ChannelIOSDK (product)
├── ChannelIOFront (binary target)
│ └── Pre-compiled framework
└── _ChannelIOSDKTarget (stub target)
└── Empty Swift source
```
--------------------------------
### Specify Swift tools version
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Defines the minimum version of Swift Package Manager required to parse the manifest.
```swift
// swift-tools-version:5.5
```
--------------------------------
### Update Package.swift Configuration
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Required fields to update when pointing to a new framework version in the manifest.
```swift
url: "https://mobile-static.channel.io/ios/NEW_VERSION/spm-xcframework.zip",
checksum: "NEW_CHECKSUM_VALUE"
```
--------------------------------
### Semantic Versioning Structure
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/version-history.md
Visual representation of the MAJOR.MINOR.PATCH versioning format used by the framework.
```text
MAJOR.MINOR.PATCH
13.2.1
│ │ └─ Patch: Bug fixes, security updates
│ └───── Minor: New features, backward compatible
└──────── Major: Breaking changes possible
```
--------------------------------
### Define Target Dependency
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Configuration snippet for linking the ChannelIOSDK product to an application target.
```swift
.target(
name: "YourApp",
dependencies: [
.product(name: "ChannelIOSDK", package: "channel-talk-ios-framework")
]
)
```
--------------------------------
### Copyright Notice Format
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Standard copyright notice format to be included in files.
```text
Copyright 2023-present Channel Talk
Licensed under the Apache License, Version 2.0
```
--------------------------------
### Binary Distribution Requirements
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Required files and notices for distributing compiled binary forms.
```text
Include:
├── License notice (readable form)
├── Copyright notice
├── Link to license source (or full text)
└── NOTICE file (if modifications)
```
--------------------------------
### Define the stub target in Package.swift
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
Add the _ChannelIOSDKTarget to the package manifest to ensure it is recognized as a source target.
```swift
.target(name: "_ChannelIOSDKTarget")
```
--------------------------------
### Set supported Swift language versions
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
Restricts the package to Swift 5.x versions.
```swift
swiftLanguageVersions: [.v5]
```
--------------------------------
### Accessing the Stub Target
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
Direct access to the stub target is not recommended and should be reserved strictly for testing or debugging purposes.
```swift
// Not recommended - only for testing/debugging
import _ChannelIOSDKTarget
let stub = ChannelIOSDKTarget()
```
--------------------------------
### Handle Errors Securely
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Use os_log for safe error logging and avoid exposing technical details to the end user.
```swift
do {
// SDK operation
} catch {
// Log safely
os_log("Operation failed: %@", error.localizedDescription)
// Don't expose technical details to user
}
```
--------------------------------
### Source Distribution Requirements
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Required files and notices for distributing source code.
```text
Include:
├── License file (full Apache 2.0 text)
├── Copyright notice
├── NOTICE file (if modifications)
└── Notice of changes
```
--------------------------------
### Rollback SDK Version
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Revert to a previous stable version in Package.swift if issues arise after an update.
```swift
// In Package.swift, revert to previous version
.from: "13.1.3" // Use previous stable version
```
--------------------------------
### Document Modifications
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/licensing-and-legal.md
Use this template in your documentation if you make modifications to the framework.
```markdown
## Modifications
- [Describe changes]
- [List files changed]
- [Date of changes]
```
--------------------------------
### Message Handling Pattern
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/api-reference.md
Pattern for sending and receiving messages, including event handling via delegates or callbacks.
```swift
// Send messages
// Receive messages through delegates/callbacks
// Handle message events
```
--------------------------------
### Implement stub target source
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/package-manifest.md
The source code for the stub target used to enable Xcode integration.
```swift
// _ChannelIOSDKTarget.swift
import Foundation
class ChannelIOSDKTarget { }
```
--------------------------------
### Verify Stub Compilation
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
Use this XCTest case to confirm that the stub target is correctly linked and accessible within the project.
```swift
import XCTest
import _ChannelIOSDKTarget
class StubTargetTests: XCTestCase {
func testStubCompiles() {
let instance = ChannelIOSDKTarget()
XCTAssertNotNil(instance)
}
}
```
--------------------------------
### View Sources Directory Structure
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/repository-structure.md
Organization of the source code directory containing the main target and stub target.
```text
Sources/
├── ChannelIOSDK/ # Main package target
│ └── ChannelIOSDK.swift # Entry point file
└── _ChannelIOSDKTarget/ # Stub target
└── _ChannelIOSDKTarget.swift
```
--------------------------------
### Stub Target Rationale in Package.swift
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
This comment explains the necessity of the stub target to bypass an SPM bug related to binary target visibility.
```swift
// NOTE: targets 안에 binaryTarget 하나만 존재할 경우 SPM Framework 추가 목록에 노출되지 않는 버그가 있어
// 이를 방지하기 위한 Stub target을 추가합니다 - finn. 2023.02.23
// English: "There is a bug where if only one binaryTarget exists in targets,
// it is not exposed in the SPM Framework addition list. To prevent this,
// we add a Stub target - finn. 2023.02.23"
```
--------------------------------
### Stub target source code
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/stub-target-reference.md
The minimal source file required to define the stub target.
```swift
//
// ChannelIOSDKTarget.swift
//
//
// Created by 구본욱 on 2023/02/23.
//
import Foundation
class ChannelIOSDKTarget { }
```
--------------------------------
### Present Channel Talk UI in View Controller
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Triggering the messaging interface from within a UIViewController lifecycle method.
```swift
import UIKit
import ChannelIOSDK
class ChatViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Present Channel Talk UI
// Use SDK methods to show messaging interface
}
}
```
--------------------------------
### Secure Token Logging
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/integration-guide.md
Avoid logging sensitive user tokens directly. Rely on the SDK to manage tokens automatically.
```swift
// Bad - never log tokens
print("Token: \(token)")
// Good - handle securely
// Let SDK manage tokens automatically
```
--------------------------------
### Clear and resolve SPM cache
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/installation-and-setup.md
Use these commands to clear the local Swift Package Manager cache and force a re-resolution of dependencies.
```bash
rm -rf ~/Library/Caches/org.swift.swiftpm
xcodebuild -resolvePackageDependencies
```
--------------------------------
### Add Dependency to Target
Source: https://github.com/channel-io/channel-talk-ios-framework/blob/master/_autodocs/overview.md
Include the ChannelIOSDK dependency in your application target configuration.
```swift
.target(
name: "YourApp",
dependencies: ["ChannelIOSDK"]
)
```