An interactive iOS app inside the SDK repository for quickly validating XMPPChatCore + XMPPChatUI: environment setup (Base URL, app token, XMPP), auth via JWT (/users/client) or email/password (/users/login-with-email), then chat and a Logs tab (XMPP events from NotificationCenter).
The name SDKPlayground is intentionally not
Testingto avoid confusion with unit/UI tests.
From Examples/SDKPlayground:
./generate_xcodeproj.sh
open SDKPlayground.xcodeprojImportant: do not run only xcodegen generate without the next step. XcodeGen alone does not fully link the local SPM package, and Xcode may show Missing package product 'XMPPChatCore' / 'XMPPChatUI'. The generate_xcodeproj.sh script runs xcodegen and then fix_local_package_refs.py.
Select the SDKPlayground scheme and a simulator. The local package is connected with path: ../.. (the ethora-sdk-swift root).
The project must be opened from ethora-sdk-swift/Examples/SDKPlayground/. If you copy only the SDKPlayground folder into another repo without the package root, the relative ../.. path to Package.swift will break. In that case, update the local package path in Xcode.
| Tab | Purpose |
|---|---|
| Setup | API/XMPP parameters, auth mode, Connect / Disconnect |
| Chat | ChatWrapperView after successful Connect |
| Logs | Event stream (including XMPPConnectionStatusChanged, XMPPClientDidConnect, etc.) |
The form is persisted in UserDefaults (including password, for local debugging only).
After editing project.yml:
./generate_xcodeproj.shIf you run SDKPlayground in another repository/workspace, you need to move not only the playground project itself, but also the SDK sources it depends on.
Minimum required:
Package.swiftSources/XMPPChatCoreSources/XMPPChatUIExamples/SDKPlayground(entire folder)
Also recommended:
Package.resolved(to keep dependency versions deterministic)
SDKPlaygroundimportsXMPPChatCoreandXMPPChatUI.- These modules are built from the local Swift Package (
Package.swift+Sources/...). XMPPChatCoredepends onStarscream, and that dependency is declared inPackage.swift.
your-workspace/
Package.swift
Sources/
XMPPChatCore/
XMPPChatUI/
Examples/
SDKPlayground/
From Examples/SDKPlayground:
./generate_xcodeproj.sh
open SDKPlayground.xcodeprojSDKPlayground is configured to use a local Swift Package at ../.. (from Examples/SDKPlayground to the root containing Package.swift).
If your external workspace has a different directory depth, update the local package path in Xcode (or in project.yml).