/cometchat-skills:cometchat-ios-troubleshootingfrom cometchat-skills
Diagnoses broken CometChat iOS (Swift) integrations: blank screens, silent login failures, literal credential placeholders, empty conversations, and SDK version mismatches.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ground truth:
CometChatUIKitSwift5.2.3 +CometChatSDK4.1.10 (symbols verified vscatalogs/ios-v5.json); signatures FETCHED viacometchat-ios-core/references/docs-map.md; the invariants below (init→login order, credentials flow, SPM-only) areRULES.md+cometchat-ios-core. This diagnostics catalog is cross-checked against the live{DOCS_BASE}/ui-kit/ios/troubleshooting.mdpage (base + paths incometchat-ios-core/references/docs-map.md), and adds the host-side/runtime symptoms it doesn't cover.
cometchat-ios-core — the correct init→login→render order, the Secrets.xcconfig→Info.plist→Bundle.main credential flow, and the SwiftUI launch hook the fixes below restore.An iOS CometChat integration compiles but misbehaves at runtime: a screen that never fills, login that does nothing, or empty data.
The two dominant causes of "the screen never populates":
login() was called before initFromSettings resolved. Both are async and must COMPLETE in order; login-before-init fails with no crash and no visible error — just a screen that never loads (cometchat-ios-core).$(COMETCHAT_APP_ID). The Secrets.xcconfig → attach-to-configs → declare-in-Info.plist → read-via-Bundle.main chain has four steps; miss one and you init with the literal placeholder, which then fails auth.| Symptom | Likely cause | Fix |
|---|---|---|
| Screen never populates, no error | login before init resolved | Chain them: call login only inside the init completion (cometchat-ios-core references/swiftui.md) |
| Auth fails immediately | Wrong Region, or creds read as $(...) | Region must match the dashboard app; verify Bundle.main returns the value, not the literal $( |
Values are the literal $(...) | xcconfig not attached, or Info.plist key missing | Attach Secrets.xcconfig to the build configs AND declare each key in Info.plist (references/setup-credentials.md §2-§3) |
SPM won't resolve / app crashes at launch with Library not loaded: @rpath/CometChatCallsSDK.framework | a hand-added exact CometChatSDK pin fights the kit's own from: "4.1.10", or the kit is 5.2.0 to 5.2.2 (launch crash without the Calls SDK) | Depend on CometChatUIKitSwift alone, Up to Next Major from 5.2.3; remove the Chat SDK pin (cometchat-ios-core Install) |
| Build fails after adding a Podfile | Tried CocoaPods | SPM only — a Podfile is a detection signal, not an instruction; remove the pod integration |
| Conversations empty | New app has no conversations, or wrong scope | Send a first message; check the request scope |
login "user not found" | UID does not exist in the app | Use a real UID (Dashboard → Users; fresh apps seed cometchat-uid-1) — never a guessed superhero* |
| Calls fail / no permission prompt | Missing usage-description strings or VoIP entitlement | Add NSCameraUsageDescription + NSMicrophoneUsageDescription; enable the VoIP entitlement (cometchat-ios-push/-calls) |
| Works in dev, fails in release | Auth Key stripped for release but still using login(uid:) | Switch to login(authToken:) with a server token (cometchat-ios-production) |
Enable SDK logging and read the Xcode console: an init/lifecycle error (a call made before init() resolved) is the usual "nothing renders" cause; auth errors are almost always Region or a literal-placeholder credential. Then fetch the feature's page via cometchat-ios-core/references/docs-map.md. Never diagnose from the binary framework's headers or from memory — fetch the documented signature.
init and login both resolve (in order) before the chat screen renders · Bundle.main returns real credential values, not $(...) · the exact kit/SDK versions are pinned · conversations render or show the empty state · a message sends and arrives · calls prompt for permission.
Do not hard-code credentials to get past the $(...) literal — fix the xcconfig/Info.plist chain; do not add CocoaPods to work around an SPM resolve issue — pin the exact versions; do not hard-code a UID to dodge "user not found."
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cometchat, ios, swift, troubleshooting, chat-sdk, blank-screen
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'.Other plugins' skills for the same job