Quick Start
Quick Start Guide
Get a working voice call in your iOS app in under 5 minutes.
Before You Begin
Make sure you have:
- ✅ Xcode 15.0 or later
- ✅ iOS 15.0+ target
- ✅ A Kasookoo publishable key (get one at kasookoo.ai/signup)
- ✅ A real iOS device (recommended; simulator has audio limitations)
Step 1: Install the SDK (1 minute)
Using Swift Package Manager (Recommended)
- Open your Xcode project
- Go to File → Add Package Dependencies
- Paste the URL:
https://github.com/kasookoo/ios-sdk.git - Choose Up to Next Major Version, starting from
1.0.0 - Click Add Package
- Select KasookooSDK target → Add Package
Manual Setup
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/kasookoo/ios-sdk.git", from: "1.0.0")
],
targets: [
.target(
name: "YourApp",
dependencies: ["KasookooSDK"]
)
]Step 2: Configure Your App (2 minutes)
Add Required Capabilities
In Xcode, select your project → Signing & Capabilities tab → + Capability:
-
✅ Add Background Modes:
- Check: Voice over IP
- Check: Audio, AirPlay, and Picture in Picture
-
✅ Add Push Notifications (if using incoming calls)
Update Info.plist
Add the microphone permission:
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access to make voice calls.</string>Step 3: Initialize the SDK (1 minute)
In your app entry point or AppDelegate:
import SwiftUI
import KasookooSDK
@main
struct MyApp: App {
@StateObject private var sdkManager = SDKManager()
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(sdkManager)
.task {
await initializeSDK()
}
}
}
func initializeSDK() async {
do {
let config = KasookooConfig(
publishableKey: "pk_test_YOUR_KEY_HERE",
organizationId: "your_org_id",
environment: .sandbox // or .production
)
try await sdkManager.sdk.initialize(config: config)
print("✅ SDK initialized")
} catch {
print("❌ SDK init failed: \(error)")
}
}
}Step 4: Connect and Identify (1 minute)
After initialization, connect to backend and identify the user:
// Connect to backend (establishes session)
try await sdk.connect()
// Identify the current user
let profile = CallerProfile(
name: "Alice Smith",
email: "[email protected]",
phoneNumber: "+1234567890",
type: .customer
)
try await sdk.identify(callerProfile: profile)Step 5: Make Your First Call (30 seconds)
let caller = Participant(
name: "Alice Smith",
email: "[email protected]",
phoneNumber: "+1234567890",
type: .customer
)
let callee = Participant(
name: "Bob Agent",
email: "[email protected]",
phoneNumber: "+0987654321",
type: .agent
)
let params = StartCallParams(
roomName: "room_\(UUID().uuidString)",
caller: caller,
callee: callee
)
do {
let call = try await sdk.call.start(params: params)
print("📞 Call started: \(call.id)")
} catch {
print("❌ Call failed: \(error)")
}🎉 You Did It!
You now have a working voice call. Let's verify:
Check the Logs
You should see something like:
✅ SDK initialized
✅ Session created, TTL: 600s
✅ User identified: [email protected]
📞 Call started: <call-id>
✅ LiveKit: Connecting to room...
✅ Room connected
✅ Microphone enabled
Test in the Simulator
The call will initiate even on the simulator — you'll see the call state transition through:
initiating → ringing → connecting → connected
Note: Real audio requires a physical device.
Next Steps
Now that you have the basics working, explore more:
| Guide | What You'll Learn |
|---|---|
| Receiving Calls | Handle incoming calls with CallKit |
| Push Notifications | Set up Firebase for incoming call pushes |
| Messaging | Send and receive messages |
| Event Handling | Subscribe to SDK events |
| Error Handling | Gracefully handle failures |
| Production Checklist | Prepare for App Store release |
Need Help?
- 📖 Full Documentation: docs.kasookoo.ai
- 💬 Community: Discord
- 📧 Support: [email protected]
- 🎬 Demo App: github.com/kasookoo/ios-demo
Common Issues
"SDK not initialized" error
Make sure you call initialize() before any other SDK method.
"Invalid publishable key" error
- Double-check the key format: should start with
pk_test_orpk_live_ - Verify the key in your Kasookoo Dashboard
Call connects but no audio
- Verify microphone permissions granted
- Test on a real device (not simulator)
- Check
Info.plisthasNSMicrophoneUsageDescription
Build fails with "No such module 'KasookooSDK'"
- Verify package is added in Package Dependencies
- Clean build folder:
Cmd+Shift+K - Restart Xcode
For more troubleshooting, see Troubleshooting Guide.
Updated 15 days ago
