This guide covers specific integration scenarios and deployment options for ChatKit.
📚 For learning to build with ChatKit, see the Getting Started Guide or Quick Start Guide.
🔧 For build tooling setup, see the Build Tooling Guide for Makefile, XcodeGen, and reproducible builds.
📖 For comprehensive development guides, see the Swift Developer Guide or Objective-C Developer Guide.
- Package Manager Setup
- CocoaPods Integration
- Manual XCFramework Integration
- Build Settings and Configuration
- Deployment and Distribution
For Swift Package projects:
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "YourApp",
platforms: [
.iOS(.v16)
],
dependencies: [
.package(url: "https://github.com/Geeksfino/finclip-chatkit.git", from: "0.7.4")
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "ChatKit", package: "finclip-chatkit")
]
)
]
)For Xcode projects:
- File → Add Package Dependencies...
- Enter repository URL:
https://github.com/Geeksfino/finclip-chatkit.git - Choose version:
0.7.4or later - Select
ChatKitproduct - Add to your target
For projects using XcodeGen:
name: YourApp
options:
bundleIdPrefix: com.yourcompany
deploymentTarget:
iOS: "16.0"
packages:
ChatKit:
url: https://github.com/Geeksfino/finclip-chatkit.git
from: 0.7.4
targets:
YourApp:
type: application
platform: iOS
sources:
- path: App
dependencies:
- package: ChatKitplatform :ios, '16.0'
use_frameworks!
target 'YourApp' do
pod 'ChatKit', :podspec => 'https://raw.githubusercontent.com/Geeksfino/finclip-chatkit/main/ChatKit.podspec'
endNote: We use a direct podspec URL because the "ChatKit" name on CocoaPods trunk is occupied by a different project.
# Install dependencies
pod install
# Open workspace (not .xcodeproj!)
open YourApp.xcworkspace# Update to latest version
pod update ChatKit
# Or update all pods
pod updateFor projects that can't use package managers:
Download ChatKit.xcframework.zip from GitHub Releases:
curl -LO https://github.com/Geeksfino/finclip-chatkit/releases/download/v0.7.4/ChatKit.xcframework.zip
unzip ChatKit.xcframework.zip- Drag
ChatKit.xcframeworkinto your Xcode project - Select Copy items if needed
- Add to your app target
In General → Frameworks, Libraries, and Embedded Content:
- Select
ChatKit.xcframework - Set to Embed & Sign
import FinClipChatKitChatKit requires specific build settings for proper framework resolution.
Add these to your target's Build Settings:
FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*] = $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks @loader_path/Frameworks/FinClipChatKit.framework/Frameworks
SWIFT_INCLUDE_PATHS[sdk=iphoneos*] = $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*] = $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
If using XcodeGen, add to your project.yml:
targets:
YourApp:
settings:
ENABLE_BITCODE: NO
FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]: $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]: $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
LD_RUNPATH_SEARCH_PATHS: $(inherited) @executable_path/Frameworks @loader_path/Frameworks @loader_path/Frameworks/FinClipChatKit.framework/Frameworks
SWIFT_INCLUDE_PATHS[sdk=iphoneos*]: $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/Frameworks
SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*]: $(inherited) $(BUILT_PRODUCTS_DIR)/FinClipChatKit.framework/FrameworksAdd a post-build script to sign nested frameworks:
postbuildScripts:
- name: Sign Nested Frameworks
shell: /bin/sh
script: |
FRAMEWORK_DIR="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FinClipChatKit.framework/Frameworks"
if [ -d "${FRAMEWORK_DIR}" ]; then
find "${FRAMEWORK_DIR}" -type d -name "*.framework" -print0 | while IFS= read -r -d '' FRAME; do
/usr/bin/codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements "${FRAME}" || exit 1
done
fiChatKit is App Store ready. No special steps needed.
Important: Ensure you're using v0.7.4 or later which includes proper code signing for all nested frameworks.
Works out of the box. Upload your IPA as normal:
xcodebuild archive -scheme YourApp -archivePath build/YourApp.xcarchive
xcodebuild -exportArchive -archivePath build/YourApp.xcarchive -exportPath build/YourApp.ipa -exportOptionsPlist ExportOptions.plistSame as App Store builds. Ensure proper provisioning profiles.
Fully supported. Use your enterprise certificate for code signing.
| Platform | Supported | Minimum Version |
|---|---|---|
| iOS | ✅ | 16.0+ |
| iPadOS | ✅ | 16.0+ |
| macOS | ❌ | N/A |
| tvOS | ❌ | N/A |
| watchOS | ❌ | N/A |
| Tool | Minimum Version |
|---|---|
| Xcode | 15.0 |
| Swift | 5.9 |
| iOS | 16.0 |
ChatKit bundles these frameworks:
ChatKit.xcframework
├── FinClipChatKit.framework (main)
│ ├── NeuronKit.framework
│ ├── ConvoUI.framework
│ ├── SandboxSDK.framework
│ └── convstore.framework (convstorelib)
All frameworks are embedded and signed. No additional setup needed.
Solution: Check framework search paths (see Build Settings)
Solution:
- Check runpath search paths include
@loader_path/Frameworks/FinClipChatKit.framework/Frameworks - Ensure nested frameworks are signed (see post-build script above)
Solution:
- Ensure you're importing
FinClipChatKit, notChatKitimport FinClipChatKit // ✅ Correct import ChatKit // ❌ Wrong
- Clean build folder: Product → Clean Build Folder (⇧⌘K)
Solution: Reset package caches
# Clear SPM cache
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf .build
# Resolve packages again
swift package resolveSolution: Update CocoaPods and clear cache
# Update CocoaPods
sudo gem install cocoapods
# Clear cache
pod cache clean --all
pod deintegrate
pod installBreaking Changes:
ChatKitCoordinatoris now the recommended entry point- Direct
NeuronRuntimecreation is discouraged
Migration Steps:
-
Update dependency version:
.package(url: "https://github.com/Geeksfino/finclip-chatkit.git", from: "0.7.4")
-
Replace direct runtime creation:
// ❌ Old way (v0.2.x) let runtime = NeuronRuntime(config: config) // ✅ New way (v0.3.x) let coordinator = ChatKitCoordinator(config: config) let runtime = coordinator.runtime
-
Keep coordinator alive:
class MyViewController: UIViewController { private var coordinator: ChatKitCoordinator? // Store it! func setup() { coordinator = ChatKitCoordinator(config: config) // Now use coordinator.runtime } }
name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.0.app
- name: Resolve SPM Dependencies
run: swift package resolve
- name: Build
run: swift build
- name: Test
run: swift testlane :build do
cocoapods
gym(
scheme: "YourApp",
clean: true,
output_directory: "./build"
)
endFor developing with a local ChatKit build:
// In Package.swift
.package(path: "../chatkit/.dist")See AI-Bank example for reference.
Not recommended. If absolutely needed:
- Use different product names
- Namespace your imports
- Ensure no symbol conflicts
If bundling ChatKit into your own framework:
- Re-export public symbols
- Maintain search paths
- Sign all nested frameworks
See: demo-apps/iOS/AI-Bank/Package.swift
See: demo-apps/iOS/Smart-Gov/project.yml (before simplification)
See: demo-apps/iOS/Smart-Gov/Podfile
For integration issues:
- Check Troubleshooting Guide
- Review Running Demos for example apps
- Open GitHub Issue
Next Steps:
- Getting Started Guide - Learn to build with ChatKit
- Quick Start Guide - Minimal skeleton code
- Swift Developer Guide - Comprehensive Swift patterns
- Objective-C Developer Guide - Complete Objective-C guide