Логотип Cometchat Ios Calls

Cometchat Ios Calls

Організація
cometchat
cometchat-ios-calls

Add voice and video calling to an iOS CometChat app — call buttons, incoming/ongoing call screens, call logs, and CallKit ringing. Triggers: 'add video calling ios', 'cometchat voice call swift', 'incoming call screen ios', 'call logs cometchat ios'.

Огляд

Видавецьcometchat
Репозиторійcometchat-skills
Назва навичкиcometchat-ios-calls
Зірки
109
Форки
2
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем cometchat. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Cometchat Ios Calls у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-ios-calls
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-ios-calls .claude/skills/cometchat-ios-calls
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Cometchat Ios Calls в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Cometchat Ios Calls, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Cometchat Ios Calls не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Companion skills (read first)

  • cometchat-ios-core owns setup and the chat surface. This skill ADDS calling. Note core ALREADY links CometChatCallsSDK at exactly 5.0.3 — on 5.1.22 (as since 5.1.19) the kit's interface imports it, so it is required even for chat-only builds. Do not add it twice or at a different version.

Use this skill when

"add voice/video calling", "show an incoming call screen", "add call history".

Calls has its OWN login — the UI Kit's login is not enough

CometChatUIKit.login(uid:) does NOT authenticate the Calls SDK. Built without the bootstrap below, CometChatCallLogs shows "Oops! Looks like something went wrong" — its request goes out with an EMPTY authToken (measured on 5.1.19/5.0.3). No error points at the cause. After the UI Kit login succeeds, run:

swift
// DEFAULT — the ai-agent / telemetry-attributed init (persists integrationSource="ai-agent").
// Takes NO settings argument: it reads the SAME bundled cometchat-settings.json the core skill
// already ships (Copy Bundle Resources) — do not build a second settings object.
_ = CometChatCalls.initFromSettings(onSuccess: { _ in
    guard let token = CometChat.getUserAuthToken() else { return }
    CometChatCalls.login(authToken: token,
                         onSuccess: { _ in /* calls surfaces are now live */ },
                         onError:   { error in debugPrint("calls login:", error.errorDescription) })
}, onError: { error in debugPrint("calls init:", error?.errorDescription ?? "nil") })

⚠️ Init the Calls SDK via CometChatCalls.initFromSettings, NOT the classic CometChatCalls(callsAppSettings: CallAppSettingsBuilder()…) builder — that path attributes the app to "manual" and loses the ai-agent telemetry (RULES §5 / AUDIT-175, the SAME rule the headless cometchat-ios-v5-sdk follows). The builder init is the FALLBACK ONLY, for an app that does not bundle cometchat-settings.json:

swift
// FALLBACK — only when no cometchat-settings.json is bundled. Loses ai-agent attribution.
let callSettings = CallAppSettingsBuilder().set(appID: appID).set(region: region).build()
_ = CometChatCalls(callsAppSettings: callSettings, onSuccess: { _ in /* … login as above … */ },
                   onError: { error in debugPrint("calls init:", error?.errorDescription ?? "nil") })

Never do both — a builder init AFTER initFromSettings re-attributes the app to "manual". initFromSettings fails SETTINGS_FILE_NOT_FOUND if the file is not in Copy Bundle Resources — the core skill already adds it for chat, so a UI-Kit app that shipped chat first already satisfies this.

The docs' calling-integration page says linking the SDK is enough; it is not — that gap is logged for the docs. Chat-only apps skip all of this (they link the Calls SDK purely to satisfy 5.1.19's import — see the core skill's install notes).

The five components

ComponentRole
CometChatCallButtonsVoice/video triggers. Has NO no-arg init — construct it as CometChatCallButtons(width:height:). set(user:) or set(group:), plus set(controller:). Put it in the message header's slot, not beside it.
CometChatIncomingCallThe ringing screen. set(call:), set(onAcceptClick:), set(onCancelClick:) — decline is onCancelClick, there is no onDeclineClick.
CometChatOngoingCallThe in-call surface. set(sessionId:) — lowercase d; set(sessionID:) does not compile. Also set(callSettingsBuilder:), set(callWorkFlow:).
CometChatOutgoingCallThe caller's ringing screen while the other side has not answered. set(call:), set(onCancelClick:).
CometChatCallLogsCall history. See the Any warning below — this component is the worst offender.

CometChatCallLogs callbacks are Any-typed — cast before touching anything. Unlike every other list component, five of its setters hand back untyped values and will not compile if you use them directly: set(onItemClick:) → (_ callLog: Any) · set(onCallButtonClicked:) → (Any) · set(options:) → (_ callLog: Any) · set(onLoad:) → ([Any]) · set(onError:) → (_ error: Any), not CometChatException like everywhere else.

swift
logs.set(onItemClick: { callLog in
    guard let log = callLog as? CallLog else { return }   // NOT `as? Call` — that cast FAILS at
    …  // runtime and makes the tap a silent no-op (measured: RUNTIME TYPE = CallLog).
    // CallLog exposes status, type, mode, initiator, receiver — not the Call spellings
    // (callStatus/callType/callInitiator/callReceiver). CallLog is a Calls-SDK type.
})
logs.set(onError: { error in
    // The value is the CALLS SDK's exception type — casting to the chat SDK's
    // CometChatException fails and prints nothing useful (measured).
    debugPrint((error as? CometChatCallException)?.errorDescription ?? "\(error)")
})

sessionID vs sessionId — the same concept, spelled two ways. The SDK's Call exposes sessionID (capital), while the kit's CometChatOngoingCall takes set(sessionId:) (lowercase). Reading a log and starting a call in the same function means using both spellings; neither compiles in the other's place.

Voice/video click handlers on CometChatCallButtons are properties: callButtons.onVoiceCallClick = { user, group in … }, onVideoCallClick likewise. And it is set(callSettingsBuilder:) — plural "Settings".

@MainActor if you construct these in a factory. Inside a UIViewController this wiring is free (already main-actor). But if you wrap it in a standalone factory/enum/static method, mark that context @MainActor — the components' setters are main-actor-isolated. CometChatOutgoingCall is the strictest: unlike CometChatIncomingCall/CometChatCallButtons it carries no @preconcurrency, so under Swift 5 its set(call:)/set(onCancelClick:) are a HARD ERROR from a nonisolated context ("call to main actor-isolated instance method … in a synchronous nonisolated context"), not just a warning. (Same rule as cometchat-ios-core's @MainActor-factory note.)

swift
// Minimum voice-video-calls wiring — all five components (inside a @MainActor context, e.g. a UIViewController)
let callButtons = CometChatCallButtons(width: 180, height: 40)
callButtons.set(user: user)          // or .set(group:) for a group call
callButtons.set(controller: self)
callButtons.onVoiceCallClick = { user, group in /* initiate voice call */ }
callButtons.onVideoCallClick = { user, group in /* initiate video call */ }

// Present incoming call over any screen via a global app-level listener
let incoming = CometChatIncomingCall()
incoming.set(call: incomingCall)
// accept/cancel closures are TWO-arg: (call: Call?, controller: UIViewController?). A one-arg
// `{ call in … }` does NOT compile ("expects 2 arguments, but 1 was used").
incoming.set(onAcceptClick: { call, _ in /* push CometChatOngoingCall */ })
incoming.set(onCancelClick: { call, _ in self.dismiss(animated: true) })

let outgoing = CometChatOutgoingCall()
outgoing.set(call: pendingCall)
outgoing.set(onCancelClick: { call, _ in self.dismiss(animated: true) })

let ongoing = CometChatOngoingCall()
// `Call.sessionID` (uppercase D, SDK) is OPTIONAL (String?); `set(sessionId:)` (lowercase d, kit)
// wants a non-optional String — so GUARD it. Passing the optional directly does not compile.
if let sid = pendingCall.sessionID { ongoing.set(sessionId: sid) }

let logs = CometChatCallLogs()
// NOTE: CometChatCallLogs has NO `set(controller:)` — present/push it like any UIViewController
// (e.g. UINavigationController(rootViewController: logs)). Its only setters are the Any-typed
// callbacks below plus set(callRequestBuilder:).
logs.set(onItemClick: { callLog in guard let log = callLog as? CallLog else { return } /* … */ })

Incoming calls are app-level, not screen-level

A call can arrive on any screen, so listen at the app level (CometChatCallEventListener / CometChatCallEvents) and present CometChatIncomingCall over whatever is showing. Wiring it inside one chat screen means calls are missed everywhere else.

Permissions and background

Camera and microphone usage descriptions in Info.plist, or the app crashes on first call rather than failing gracefully. Ringing while backgrounded is handled by the CometChatPushNotifications SDK — it owns CallKit + PushKit for you. Do NOT hand-roll PKPushRegistryDelegate / CXProviderDelegate or call UIKitSettings.set(voipToken:) (that setter is the legacy path the current docs no longer use). Full VoIP wiring: cometchat-ios-v5-sdk § "VoIP call notifications" and cometchat-ios-push; needs an APNs VoIP provider in the Dashboard and a physical device.

Gotchas

  • Simulator limits. No camera; a WebRTC surface may behave differently than on device. Verify calling on a real device.
  • Every call screen needs an exit. Accept, decline and hang-up must all lead somewhere.
  • Version lock. Kit 5.1.22 / SDK 4.1.7 / Calls 5.0.3 are exact; mixing versions fails to build or crashes at runtime.

Verify it works

On a device: the call button appears in the header, tapping it rings the other side, the incoming screen shows over whatever was on screen, accept connects with audio and video, hang-up releases camera and microphone, and the call appears in call logs.

Поширені запитання

Що робить навичка ШІ Cometchat Ios Calls?

Add voice and video calling to an iOS CometChat app — call buttons, incoming/ongoing call screens, call logs, and CallKit ringing. Triggers: 'add video calling ios', 'cometchat voice call swift', 'incoming call screen ios', 'call logs cometchat ios'.

Навіщо використовувати Cometchat Ios Calls у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Cometchat Ios Calls — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Cometchat Ios Calls у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-ios-calls. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Cometchat Ios Calls?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Cometchat Ios Calls?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Cometchat Ios Calls — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Cometchat Ios Calls?

Так. Навичку опубліковано на GitHub: cometchat, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇