├── .swiftpm
└── xcode
│ ├── package.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── admin.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── apple.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ ├── admin.xcuserdatad
│ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── apple.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── Package.swift
└── README.md
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cometchat/calls-sdk-ios/fe5f6696578b3bc4129018689eb578e20dbdf7c8/.swiftpm/xcode/package.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cometchat/calls-sdk-ios/fe5f6696578b3bc4129018689eb578e20dbdf7c8/.swiftpm/xcode/package.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/.swiftpm/xcode/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CometChatCallsSDK.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 | CometChatProCalls.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 1
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | CometChatCalls
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CometChatCallsSDK.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.3
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "CometChatCallsSDK",
8 | platforms: [
9 | // Only add support for iOS 11 and up.
10 | .iOS(.v11)
11 | ],
12 | products: [
13 | .library(name: "CometChatCallsSDK", targets: ["CometChatCallsSDK","WebRTC"])
14 | ],
15 | targets: [
16 | .binaryTarget(
17 | name: "CometChatCallsSDK",
18 | url: "https://library.cometchat.io/ios/v4.0/xcode16/CometChatCallsSDK_4_1_2.xcframework.zip",
19 | checksum: "2170924015380801b3fa679a7a87d02472f2eb59947547da283fe0c49828ea20"
20 | ),
21 | .binaryTarget(
22 | name: "WebRTC",
23 | url: "https://library.cometchat.io/ios/v2.1/xcode12/WebRTC_1.xcframework.zip",
24 | checksum: "3060aaaf679df346075f5c90f4dd816312e30dc73b925ec5e9d868923c7b5159"
25 | )
26 | ]
27 |
28 | )
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | # CometChat iOS Calls SDK
7 |
8 | CometChat enables you to add voice, video & text chat for your website & app.
9 | ___
10 |
11 | ## Prerequisites :star:
12 |
13 | Before you begin, ensure you have met the following requirements:
14 |
15 | ✅ You have installed the latest version of Xcode. (Above Xcode 12 Recommended)
16 |
17 | ✅ iOS Calls SDK works for iOS devices from iOS 11 and above.
18 |
19 | ___
20 |
21 | ## Installing iOS Chat SDK
22 |
23 | ## 1. Setup :wrench:
24 |
25 | To install iOS Call SDK, you need to first register on CometChat Dashboard. Click here to [sign up](https://app.cometchat.com/login).
26 |
27 | ### i. Get your Application Keys :key:
28 |
29 | * Create a new app
30 | * Head over to the Quick Start or API & Auth Keys section and note the `App ID`, `Auth Key`, and `Region`.
31 | ---
32 |
33 | ### ii. Add the CometChatCallsSDK Dependency
34 |
35 |
36 | We recommend using CocoaPods, as they are the most advanced way of managing iOS project dependencies. Open a terminal window, move to your project directory, and then create a Podfile by running the following command
37 |
38 |
39 | Create podfile using below command.
40 |
41 | ```bash
42 | $ pod init
43 | ```
44 | Add the following lines to the Podfile.
45 |
46 | ```bash
47 | ________________________________________________________________
48 |
49 | For Xcode 12 and above:
50 |
51 | platform :ios, '11.0'
52 | use_frameworks!
53 |
54 | target 'YourApp' do
55 | pod 'CometChatCallsSDK', '4.0.8'
56 | end
57 | ________________________________________________________________
58 |
59 |
60 | ```
61 | And then install the `CometChatCallsSDK` framework through CocoaPods.
62 |
63 | ```bash
64 | pod install
65 | ```
66 |
67 | If you're facing any issues while installing pods then use the below command.
68 |
69 |
70 | ```bash
71 | pod install --repo-update
72 | ```
73 |
74 | ___
75 |
76 | ## 2. Configure CometChat inside your app
77 |
78 | ### i. Initialize CometChat :star2:
79 |
80 | The `init()` method initializes the settings required for CometChatCallsSDK. We suggest calling the `init()` method on app startup, preferably in the `didFinishLaunchingWithOptions()` method of the Application class. If you are using CometChat's iOS Chats SDK then initialize Calls SDK after initializing Chat SDK.
81 |
82 | ```swift
83 | import Foundation
84 | import CometChatCallsSDK
85 |
86 | @UIApplicationMain
87 | class AppDelegate: UIResponder, UIApplicationDelegate {
88 |
89 | var window: UIWindow?
90 |
91 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
92 | // Override point for customization after application launch.
93 |
94 | let callAppSettings = CallAppSettingsBuilder()
95 | .setAppId(APP_ID)
96 | .setRegion(REGION)
97 | .build()
98 |
99 | CometChatCalls.init(callsAppSettings: callAppSettings) { success in
100 | print("CometChatCalls init success")
101 | } onError: { error in
102 | print("CometChatCalls init failed With error \(error)")
103 | }
104 |
105 | return true
106 | }
107 | ```
108 | **Note :**
109 | Make sure you replace the APP_ID with your CometChat `appId` and `region` with your app region in the above code.
110 |
111 | ___
112 |
113 | **Note :**
114 | * Make sure you replace the `authKey` with your CometChat Auth Key in the above code.
115 |
116 | * We have set up 5 users for testing having UIDs: `SUPERHERO1`, `SUPERHERO2`, `SUPERHERO3`, `SUPERHERO4`, and `SUPERHERO5`.
117 |
118 | ---
119 |
120 | # Checkout our sample apps
121 |
122 | ## Swift:
123 | Visit our [Swift sample app](https://github.com/cometchat/cometchat-sample-app-ios) repo to run the Swift sample app.
124 |
125 | ---
126 |
127 |
128 | ## Help and Support
129 | For issues running the project or integrating with our UI Kits, consult our [documentation](https://www.cometchat.com/docs/react-uikit/integration) or create a [support ticket](https://help.cometchat.com/hc/en-us) or seek real-time support via the [CometChat Dashboard](https://app.cometchat.com/).
130 |
--------------------------------------------------------------------------------