Installation
Installation Guide
Complete installation guide for the Kasookoo iOS SDK, from package installation to push notification setup.
Table of Contents
- System Requirements
- SDK Installation
- Xcode Project Configuration
- Apple Developer Setup
- Firebase Setup (for Push Notifications)
- Verify Installation
System Requirements
Development Environment
| Component | Minimum | Recommended |
|---|---|---|
| macOS | 13.0 (Ventura) | 14.0 (Sonoma) or later |
| Xcode | 15.0 | 16.0+ |
| Swift | 5.9 | 6.0+ |
Target Environment
| Component | Minimum | Recommended |
|---|---|---|
| iOS | 15.0 | 17.0+ |
| Devices | iPhone 8+ | iPhone 12+ |
Account Requirements
- ✅ Paid Apple Developer Program account ($99/year) — required for push notifications
- ✅ Kasookoo account with publishable key — sign up at kasookoo.ai
- ✅ Firebase account (free) — required for push notifications
SDK Installation
Method 1: Swift Package Manager (Recommended)
Via Xcode UI
- In Xcode, open your project
- Select File → Add Package Dependencies
- Enter the repository URL:
https://github.com/kasookoo/ios-sdk.git - Select Dependency Rule:
Up to Next Major Versionfrom1.0.0 - Click Add Package
- Select your app target
- Click Add Package
Via Package.swift
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "YourApp",
platforms: [.iOS(.v15)],
dependencies: [
.package(
url: "https://github.com/kasookoo/ios-sdk.git",
from: "1.0.0"
)
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "KasookooSDK", package: "ios-sdk")
]
)
]
)Method 2: CocoaPods
Add to your Podfile:
platform :ios, '15.0'
target 'YourApp' do
use_frameworks!
pod 'KasookooSDK', '~> 1.0'
endThen run:
pod installOpen the .xcworkspace file going forward.
Xcode Project Configuration
1. Enable Required Capabilities
- Select your project in Xcode
- Select your app target
- Go to Signing & Capabilities tab
- Click + Capability and add:
Background Modes
- ✅ Voice over IP — Required for VoIP push notifications
- ✅ Audio, AirPlay, and Picture in Picture — Required for call audio
Push Notifications
- ✅ Add Push Notifications capability — Required for incoming calls
2. Configure Info.plist
Add these entries to your Info.plist:
<!-- Microphone permission for voice calls -->
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access to make voice calls.</string>
<!-- Camera permission (for future video support) -->
<key>NSCameraUsageDescription</key>
<string>This app needs camera access for video calls.</string>
<!-- Required background modes -->
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
<string>audio</string>
</array>3. Bundle Identifier
Make sure your Bundle Identifier is set:
- Select project → target → General tab
- Note your Bundle Identifier (e.g.,
com.yourcompany.yourapp) - You'll need this for Firebase and Apple Developer setup
Apple Developer Setup
1. Register App ID
- Go to Apple Developer Portal
- Navigate to Certificates, Identifiers & Profiles
- Select Identifiers → Click +
- Select App IDs → Continue
- Choose App → Continue
- Fill in:
- Description: Your app name
- Bundle ID: Explicit, e.g.,
com.yourcompany.yourapp
- Under Capabilities, enable:
- ✅ Push Notifications
- ✅ Background Modes (Voice over IP)
- Click Continue → Register
2. Create APNs Authentication Key
This key allows Firebase to send pushes to iOS devices via Apple.
- In Apple Developer Portal → Keys → Click +
- Fill in:
- Key Name: "Kasookoo Push Key" (or any descriptive name)
- Check ✅ Apple Push Notifications service (APNs)
- Click Continue → Register
- Download the
.p8file — save it carefully!This file can only be downloaded ONCE - Note these values from the key details:
- Key ID (10 characters, e.g.,
ABC123DEFG) - Team ID (visible in top-right corner of Apple Developer)
- Key ID (10 characters, e.g.,
Firebase Setup (for Push Notifications)
Note: If you're using Kasookoo's hosted Firebase project, skip this section and use the
GoogleService-Info.plistprovided during onboarding.
1. Create a Firebase Project
- Go to Firebase Console
- Click Add project
- Enter project name (e.g., "MyApp-iOS")
- Disable Google Analytics for now (you can enable later)
- Click Create project
2. Add iOS App to Firebase
- In Firebase project dashboard, click iOS icon
- Fill in:
- Apple bundle ID: Same as your Xcode project (e.g.,
com.yourcompany.yourapp) - App nickname: "MyApp iOS"
- App Store ID: Leave blank
- Apple bundle ID: Same as your Xcode project (e.g.,
- Click Register app
3. Download GoogleService-Info.plist
- Click Download GoogleService-Info.plist
- Drag this file into your Xcode project
- In Xcode dialog:
- ✅ Check Copy items if needed
- ✅ Check Add to targets: Your app target
- Click Finish
4. Upload APNs Key to Firebase
- In Firebase Console → Project Settings → Cloud Messaging tab
- Scroll to Apple app configuration
- Find your iOS app
- Under APNs Authentication Key, click Upload
- Fill in:
- APNs auth key file (.p8): Select your downloaded
.p8file - Key ID: The 10-character Key ID from Apple Developer
- Team ID: The 10-character Team ID from Apple Developer
- APNs auth key file (.p8): Select your downloaded
- Click Upload
5. Install Firebase iOS SDK
Add Firebase to your Package.swift or via Xcode:
https://github.com/firebase/firebase-ios-sdk.git
Select these libraries:
- ✅ FirebaseCore
- ✅ FirebaseMessaging
6. Initialize Firebase in Your App
In your AppDelegate.swift:
import UIKit
import FirebaseCore
import FirebaseMessaging
import KasookooSDK
class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
// 1. Configure Firebase
FirebaseApp.configure()
// 2. Set messaging delegate
Messaging.messaging().delegate = self
// 3. Request notification permissions
UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .badge, .sound]
) { granted, _ in
if granted {
DispatchQueue.main.async {
application.registerForRemoteNotifications()
}
}
}
return true
}
// Called when APNs token received
func application(
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
Messaging.messaging().apnsToken = deviceToken
}
}
// MARK: - Firebase Messaging Delegate
extension AppDelegate: MessagingDelegate {
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
guard let fcmToken = fcmToken else { return }
// Pass FCM token to Kasookoo SDK
Task {
try await KasookooSDK.shared.notifications.registerDevice(
fcmToken: fcmToken,
userType: .customer
)
}
}
}
// MARK: - Notification Center Delegate
extension AppDelegate: UNUserNotificationCenterDelegate {
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
let userInfo = response.notification.request.content.userInfo
// Forward to Kasookoo SDK
Task {
try await KasookooSDK.shared.notifications.handlePush(payload: userInfo)
}
completionHandler()
}
}Verify Installation
1. Build the Project
In Xcode: Cmd + B
You should see: Build Succeeded ✅
2. Test SDK Import
Create a test file or use existing one:
import KasookooSDK
let testSDK = KasookooSDK()
print("SDK loaded: \(testSDK)")If this compiles, the SDK is correctly installed.
3. Run on Device
- Connect your iPhone via USB
- Select your device in Xcode scheme
- Press Cmd + R
First-time deployment:
- iPhone will ask to trust developer: Go to Settings → General → VPN & Device Management → Trust your developer certificate
4. Check Logs
After launching the app, you should see in Xcode console:
[KasookooSDK] SDK initialized
[FirebaseMessaging] FCM token received: ...
If FCM token is received, Firebase is correctly configured.
Troubleshooting Installation
Build fails with "No such module 'KasookooSDK'"
Solutions:
- Clean build folder: Cmd + Shift + K
- Reset package caches: File → Packages → Reset Package Caches
- Quit Xcode, delete
~/Library/Developer/Xcode/DerivedData, restart Xcode
"No such module 'FirebaseCore'"
Solutions:
- Make sure you added FirebaseCore and FirebaseMessaging to your target
- In Xcode: File → Add Package Dependencies → re-add Firebase
Push notifications not working
Common causes:
- ❌ Using simulator (use real device)
- ❌ Free Apple Developer account (need paid)
- ❌
.p8key not uploaded to Firebase - ❌ Bundle ID mismatch between Xcode and Firebase
- ❌ Push capability not enabled in Apple Developer
See Push Notifications Guide for detailed troubleshooting.
"Invalid publishable key" error
Solutions:
- Verify key format: starts with
pk_test_(sandbox) orpk_live_(production) - Check key in your Kasookoo Dashboard
- Make sure you're using the right environment (
.sandboxvs.production)
Next Steps
✅ Installation complete? Continue with:
- 🚀 Quick Start Guide — Make your first call
- 📞 Making Calls Guide — Outgoing call patterns
- 📱 Receiving Calls Guide — Handle incoming calls
- 🔔 Push Notifications Guide — Detailed push setup
Need Help?
Updated 15 days ago
