Commit 068011f
Updating Documentation (#66)
* docs: update DocC documentation for v2.0.0 architecture
- Add DocC landing pages for SundialKitCombine and SundialKitStream plugins
- Update main Documentation.md to reflect v2.0.0 three-layer architecture
- Remove deprecated ConnectivityObserver.md and NetworkObserver.md (moved to plugins)
- Add .gitignore to exclude .docc-build directories
- Mark tasks 9 (Swift Testing migration) and 13 (demo app) as complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(docs): add DocC preview script with auto-rebuild
Adds preview-docs.sh script to enable local DocC documentation preview with automatic rebuilding on file changes. The script uses xcrun docc preview for serving and fswatch for monitoring Swift source changes, avoiding the need to add swift-docc as a package dependency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* git subrepo push Packages/SundialKitCombine
subrepo:
subdir: "Packages/SundialKitCombine"
merged: "899c22a"
upstream:
origin: "git@github.com:brightdigit/SundialKitCombine.git"
branch: "v1.0.0"
commit: "899c22a"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* git subrepo push Packages/SundialKitStream
subrepo:
subdir: "Packages/SundialKitStream"
merged: "7bc90df"
upstream:
origin: "git@github.com:brightdigit/SundialKitStream.git"
branch: "v1.0.0"
commit: "7bc90df"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* docs: rewrite DocC overview to focus on use cases
- Lead with practical use cases (cross-device communication, network-aware apps)
- Add "What Can You Build?" section with real-world examples
- Add "Available Packages" section with placeholder links to targets
- Remove architectural details from overview (not relevant to new users)
- Remove mentions of Heartwitch, Swift 6.1 concurrency details
- Focus on developer capabilities rather than technical implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* removing enum
* docs(docc): fix API examples and add improvement TODOs
Major documentation corrections:
- Fix NWPathMonitorAdapter → NWPathMonitor (adapter class doesn't exist)
- Fix sendMessage(dict) → send(message) to use typed Messagable API
- Fix Messagable: init? → init throws with Sendable parameters
- Fix BinaryMessagable: binaryData/from → encode/init methods
- Reorder sections: explain Messagable/BinaryMessagable before WatchConnectivity
- Add typed message receiving examples (typedMessageReceived, typedMessageStream)
Improvements:
- Add TODO warnings as DocC asides for future enhancements
- TODOs cover: explanatory text, default initializers, protocol details
Also fixes:
- ColorMessageExtensions: serializedData → serializedBytes (correct protobuf API)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(docc): address TODOs and add NetworkObserver default initializers
- Add default init() to NetworkObserver in SundialKitStream and SundialKitCombine
- Simplify Network Monitoring section with Quick Start and Advanced subsections
- Streamline Type-Safe Messaging section with key behavior as brief note
- Improve Binary Messaging section with real protobuf examples and swift-protobuf link
- Update WatchConnectivity examples to show both Messagable and BinaryMessagable types
- Add message size limit note (65KB) with link to Apple's WatchConnectivity docs
- Remove all 9 TODO warnings from Documentation.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(docc): add DocC documentation and improve preview script
Documentation improvements:
- Add SundialKitCore.docc with comprehensive package overview
- Document all core protocols, types, and error types
- Clean up structure by removing redundant content
- Add SundialError to Error Types section
Script enhancements:
- Improve preview-docs.sh with better error handling
- Add support for multiple .docc catalogs
- Update Makefile with new documentation targets
API documentation additions:
- Add detailed docs to ActivationState enum
- Add comprehensive docs to ConnectivityMessage typealias
- Enhance Interfaceable protocol documentation
- Expand PathStatus documentation with all cases
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(docc): enhance documentation with narrative flow and remove advanced sections
- Remove Architecture sections (redundant with main SundialKit docs)
- Remove Advanced Usage sections (not needed for typical users)
- Add Getting Started sections explaining plugin selection
- Add introductory text before code examples explaining use cases
- Add concluding text after examples summarizing key concepts
- Enhance inline documentation for result/context types
Changes focus documentation on practical usage patterns and improve
readability with better narrative structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fixing Makefile for Network and Connectivity
* git subrepo push Packages/SundialKitCombine
subrepo:
subdir: "Packages/SundialKitCombine"
merged: "0b8ae65"
upstream:
origin: "git@github.com:brightdigit/SundialKitCombine.git"
branch: "v1.0.0"
commit: "0b8ae65"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* git subrepo push Packages/SundialKitStream
subrepo:
subdir: "Packages/SundialKitStream"
merged: "8234353"
upstream:
origin: "git@github.com:brightdigit/SundialKitStream.git"
branch: "v1.0.0"
commit: "8234353"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* docs(docc): remove MainActor references and transport selection details
- Remove @mainactor mentions from SundialKitCombine descriptions
- Remove "all updates happen on main thread" explanations
- Remove automatic transport selection details from connectivity docs
- Preserve actor-based descriptions for SundialKitStream
- Simplify plugin comparison focusing on observation patterns
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* git subrepo push Packages/SundialKitCombine
subrepo:
subdir: "Packages/SundialKitCombine"
merged: "cbcd2cc"
upstream:
origin: "git@github.com:brightdigit/SundialKitCombine.git"
branch: "v1.0.0"
commit: "cbcd2cc"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* Fixing CI Unit Test Issues with watchOS and iOS (#67)
* fix(connectivity): eliminate observer registration race condition
Convert observer management methods to async to fix intermittent CI test failures.
## Problem
ConnectivityManager Observer Tests were failing intermittently (62% failure rate) due to race conditions:
- addObserver() used nonisolated + unstructured Task pattern
- Tests called addObserver() then immediately triggered state changes
- Observers weren't registered when notifications fired
- Tests timed out after ~35 seconds waiting for events
## Changes
- Make addObserver/removeObserver/removeObservers async in protocol
- Remove nonisolated modifier and Task wrappers from actor extension
- Add await to all test call sites (7 locations)
- Pattern now matches NetworkMonitor (already async)
## Impact
- Eliminates race condition entirely
- Observers guaranteed registered before returning
- Tests will pass reliably on iOS/watchOS simulators
- Breaking API change (callers must use await)
Fixes #<issue-number>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(connectivity): eliminate remaining observer notification race conditions
**Problem:**
Previous fix addressed race in observer registration, but tests still failed
on CI (62% failure rate) with 10-second timeouts. Root cause was TWO layers
of unstructured Tasks creating race conditions:
1. Delegate handlers (e.g., handleReachabilityChange) used nonisolated + Task
2. observerRegistry.notify() used nonisolated + Task
This created a three-layer Task cascade where notifications could fire
before observers received them, causing CI timeouts despite passing locally.
**Solution:**
- Made ObserverRegistry.notify() actor-isolated (removed nonisolated + Task)
- Made all notify*() methods in ConnectivityObserverManaging async
- Made isolated delegate handlers await notification completion
- Made NetworkMonitor.handlePathUpdate() async to match pattern
- Updated ObserverRegistry tests to await notify() calls
- Removed unnecessary Task.sleep() from tests (proper awaiting eliminates need)
**Impact:**
- All ConnectivityManagerObserverTests now pass in ~0.055s (previously timed out after 10s)
- Tests pass reliably on both iOS and watchOS simulators
- Pattern now consistent across Network and Connectivity modules
- Breaking API change: notify() now requires await, but only affects internal code
**Testing:**
- iOS simulator: 7 observer tests pass ✓
- watchOS simulator: 6 observer tests pass ✓
- All existing core and network tests pass ✓
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fixing unneeded async task
* test(watchconnectivity): eliminate waitUntil race conditions in observer tests
Replace observer notification waits with direct manager state checks to eliminate timing issues.
Since MockSession calls delegate methods synchronously and the notification chain is now fully
async/await, the manager's state is updated immediately when mock properties change.
Changes:
- Check manager state directly instead of waiting for observer notifications
- Eliminates all waitUntil calls that were timing out on CI
- Reduces test time by removing unnecessary delays
- Tests now verify manager state rather than observer timing
Fixes 6 failing tests on CI (watchOS, Xcode 26.0):
- observerReceivesActivationStateChanges
- observerReceivesReachabilityChanges
- observerReceivesCompanionAppInstalledChanges
- observerReceivesPairedStatusChanges
- reachabilityUpdatesFromDelegate
- multipleObserversReceiveNotifications
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(watchconnectivity): add Task.yield() before checking manager state
The delegate handlers use nonisolated+Task pattern, which means the Task is unstructured
and may not execute immediately when MockSession calls the delegate synchronously.
Adding Task.yield() gives the Task scheduler a chance to run the pending Task before
we check the manager's state.
Changes:
- Add await Task.yield() after setting MockSession properties
- This allows the unstructured Task in handleReachabilityChange() etc. to run
- Ensures manager state is updated before assertions run
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs(docc): enhance plugin documentation and add new logo
- Add comprehensive prose to SundialKitStream documentation
- "Why Choose SundialKitStream" section with actor-based benefits
- Getting Started with installation instructions
- Detailed explanations of network monitoring and WatchConnectivity
- SwiftUI integration patterns and architecture benefits
- Add comprehensive prose to SundialKitCombine documentation
- "Why Choose SundialKitCombine" section with Combine benefits
- Getting Started with installation instructions
- Advanced Combine patterns and reactive programming examples
- SwiftUI integration and @mainactor thread safety
- Replace logo across all four DocC packages
- Use new Sundial-Base Default logo at 256x256 resolution
- Replace logo.svg with logo.png in all Resources directories
- Update markdown references in all Documentation.md files
- Packages: SundialKitStream, SundialKitCombine, SundialKitNetwork, SundialKitConnectivity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* git subrepo push Packages/SundialKitCombine
subrepo:
subdir: "Packages/SundialKitCombine"
merged: "0825dc3"
upstream:
origin: "git@github.com:brightdigit/SundialKitCombine.git"
branch: "v1.0.0"
commit: "0825dc3"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* git subrepo push Packages/SundialKitStream
subrepo:
subdir: "Packages/SundialKitStream"
merged: "1c16d63"
upstream:
origin: "git@github.com:brightdigit/SundialKitStream.git"
branch: "v1.0.0"
commit: "1c16d63"
git-subrepo:
version: "0.4.9"
origin: "https://github.com/Homebrew/brew"
commit: "e8b7739de9"
* docs(docc): address PR review feedback
- Remove unnecessary @mainactor isolation mentions from both plugins
- Add SundialKitCombine and SundialKitStream package dependencies to installation examples
- Fix "or/and" wording in SundialKitCombine overview
- Move Ping Integration section to Network Monitoring area in SundialKitCombine
- Remove "Advanced Combine Patterns" section from SundialKitCombine
- Remove "@mainactor and Thread Safety" section from SundialKitCombine
- Change "thread safety" to "concurrency safety" in SundialKitStream tagline
- Remove "Actor-Based Architecture Benefits" section from SundialKitStream
- Remove paragraph about @mainactor annotation in SundialKitStream SwiftUI section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(docc): add comprehensive Messagable documentation to plugins
Add Type-Safe Messaging section to both SundialKitCombine and SundialKitStream:
- Messagable protocol documentation with ColorMessage example
- BinaryMessagable documentation with Protobuf and custom binary examples
- Complete SwiftUI integration examples showing:
- SundialKitCombine: @published properties with Combine
- SundialKitStream: AsyncStreams with @observable macro
- MessageDecoder usage for automatic message routing
- Full working examples with color messaging between iPhone and Watch
- Important notes about 65KB message size limits
This addresses the missing Messagable content that was present in the main
SundialKit documentation but missing from the plugin documentation files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fixing Linting Issues
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0825dc3 commit 068011f
File tree
1 file changed
+233
-69
lines changed- Sources/SundialKitCombine/SundialKitCombine.docc
1 file changed
+233
-69
lines changedLines changed: 233 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
128 | | - | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | | - | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | | - | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
167 | 165 | | |
168 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
169 | 188 | | |
170 | 189 | | |
171 | | - | |
| 190 | + | |
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | | - | |
| 194 | + | |
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
| |||
300 | 319 | | |
301 | 320 | | |
302 | 321 | | |
303 | | - | |
| 322 | + | |
304 | 323 | | |
305 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
306 | 329 | | |
307 | 330 | | |
308 | | - | |
309 | | - | |
| 331 | + | |
310 | 332 | | |
311 | | - | |
312 | | - | |
| 333 | + | |
| 334 | + | |
313 | 335 | | |
314 | | - | |
315 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
316 | 339 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
323 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
324 | 355 | | |
325 | 356 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 357 | + | |
| 358 | + | |
331 | 359 | | |
332 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
333 | 427 | | |
334 | 428 | | |
335 | | - | |
336 | | - | |
| 429 | + | |
| 430 | + | |
337 | 431 | | |
338 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
339 | 437 | | |
340 | 438 | | |
341 | | - | |
342 | | - | |
343 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
344 | 445 | | |
345 | 446 | | |
346 | | - | |
347 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
348 | 468 | | |
349 | 469 | | |
350 | | - | |
351 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
352 | 478 | | |
353 | 479 | | |
354 | | - | |
355 | 480 | | |
356 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
357 | 497 | | |
358 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
359 | 508 | | |
360 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
361 | 523 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
366 | 530 | | |
367 | | - | |
| 531 | + | |
368 | 532 | | |
369 | 533 | | |
370 | 534 | | |
| |||
0 commit comments