Add UniFFI iOS bridge crate

This commit is contained in:
Mikhail Kilin
2026-05-20 14:04:45 +03:00
parent 186f0edbb3
commit 0878ba78df
8 changed files with 1241 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
# tele-ios-ffi
UniFFI bridge for the future native iOS app.
Current scope:
- Exposes a fake-backed `SessionHandle` for Swift integration tests and app shell work.
- Mirrors the `tele-core::session` DTO/event model with UniFFI-compatible records and enums.
- Keeps real TDLib session creation out of this crate until iOS simulator/device linking is validated.
Generate Swift bindings and headers:
```bash
scripts/generate-ios-ffi-bindings.sh
```
The script builds `target/release/libtele_ios_ffi.a` and writes Swift sources,
headers, a Swift typecheck-friendly `tele_ios_ffiFFI` module map, and an
XCFramework-compatible module map under `build/ios-ffi/`.
Known blocker:
- `xcodebuild -version` currently fails on this machine because only Command Line Tools are selected:
`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`.
- Real TDLib iOS simulator/device linking therefore is not validated in this phase.