2 Commits

Author SHA1 Message Date
Ivan FB
c43072da46
feat(examples): iOS example consumes the generated Swift wrapper
Regenerates Sources/MyTimer/MyTimer.swift via `nimble genbindings_swift`
(replacing the hand-written wrapper) and points the tests at the derived
MyTimerNode class. Proves the generator reproduces the validated
create/version/echo path: build-xcframework.sh + `swift test` pass 2/2 on
the macOS slice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:40:04 +02:00
Ivan FB
014e1618ba
docs(examples): add iOS (Swift) example over the native C ABI
A SwiftPM package wrapping the timer library's native ABI behind an idiomatic
`TimerNode` Swift class. `build-xcframework.sh` cross-compiles the Nim library
to a static MyTimer.xcframework with three slices — ios-arm64 (device),
ios-arm64-simulator, and macos-arm64 — assembling the .xcframework by hand so it
works without a functioning Simulator toolchain (CI-friendly).

The wrapper bridges the async FFI-thread callback to a synchronous Swift API
with a semaphore and reads the typed EchoResponse struct out of the callback.
The macos-arm64 slice makes the wrapper testable on the host: `swift test`
passes against it. Device/simulator slices are the real iOS deployment artifacts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:37:19 +02:00