2.1 KiB
2.1 KiB
tele-ios-ffi
UniFFI bridge for the future native iOS app.
Current scope:
- Exposes a fake-backed
SessionHandlefor Swift integration tests and app shell work. - Mirrors the
tele-core::sessionDTO/event model with UniFFI-compatible records and enums. - Supports a fake-only build for UI work and a real TDLib build path using local iOS TDLib artifacts.
Generate Swift bindings and headers:
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/.
Build the fake-only iOS simulator XCFramework without linking TDLib:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/build-ios-fake-ffi-xcframework.sh
Run an executable Swift smoke test against matching fake-only UniFFI bindings:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/smoke-ios-ffi-swift.sh
Typecheck the Swift app bridge against generated UniFFI bindings:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/typecheck-ios-uniffi-app-bridge.sh
Current linking status:
- Xcode is installed at
/Applications/Xcode.app, andDEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -versionreports Xcode 26.5. - The iOS 26.5 simulator runtime is installed and
scripts/check-ios-prereqs.shpasses with available iPhone/iPad simulators. - The current app shell uses the fake Swift bridge.
tdlib-rsdoes not publish iOSdownload-tdlibarchives, so real iOS linking usestele-core/tdlib-localandLOCAL_TDLIB_PATH.- Local TDLib linking is validated for
aarch64-apple-ios-simviascripts/check-ios-tdlib-linking.shand foraarch64-apple-iosviaIOS_RUST_TARGET=aarch64-apple-ios scripts/build-ios-ffi-with-local-tdlib.sh. scripts/build-ios-real-ffi-xcframework.shpackages local simulator Rust slices plus locallibtdjsoninto app-local XCFrameworks, generates Swift bindings, and enables Xcode builds withTELE_IOS_USE_LOCAL_FFI=1.