4.4 KiB
4.4 KiB
TDLib iOS Linking Status
Local toolchain status:
- Xcode 26.5 is installed at
/Applications/Xcode.app. - iOS 26.5 simulator runtime is installed.
scripts/check-ios-prereqs.shpasses.scripts/run-ios-simulator-app.shlaunches the fake-backed SwiftUI shell in iOS Simulator.
Previous real TDLib blocker:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer cargo build -p tele-ios-ffi --target aarch64-apple-ios-sim --release
Observed failure:
[Your OS or architecture may be unsupported.] Failed to download file: Please try using the `pkg-config` or `local-tdlib` features.
404 Not Found
https://github.com/FedericoBruzzone/tdlib-rs/releases/download/v1.2.0/tdlib-1.8.29-ios-aarch64.zip
Interpretation:
- Rust, Swift, Xcode, and the iOS simulator runtime are working.
- The fake-backed iOS app shell can be built, installed, launched, and rendered.
download-tdlibcannot be used for iOS becausetdlib-rs1.2.0 does not publish the iOS artifact requested by its build script.
Current real TDLib status:
scripts/build-tdlib-ios.shbuilds TDLib1.8.29locally for iOS device and simulator..build/tdlib-ios/iphoneos/lib/libtdjson.1.8.29.dylibisarm64..build/tdlib-ios/iphonesimulator/lib/libtdjson.1.8.29.dylibis a universalx86_64+arm64simulator dylib.scripts/check-ios-tdlib-linking.shbuildstele-ios-ffiforaarch64-apple-ios-simwith local TDLib.IOS_RUST_TARGET=aarch64-apple-ios scripts/build-ios-ffi-with-local-tdlib.shbuildstele-ios-ffifor device with local TDLib.scripts/build-ios-real-ffi-xcframework.shpackages simulator Rust slices intotele_ios_ffi.xcframework, packages locallibtdjsonintotdjson.xcframework, and writes generated Swift bindings into the Swift package's localGeneratedpath.TELE_IOS_USE_LOCAL_FFI=1 scripts/build-ios-simulator-app.shbuilds and packages the SwiftUI simulator app against the real Rust/TDLib FFI path, includingFrameworks/libtdjson.dylibin the.appbundle.- The repo patches
tdlib-rsthroughcrates/vendor/tdlib-rsbecause upstreamsrc/build.rsdoes not handletarget_os = "ios"forlocal-tdlib.
Selected path:
- Keep
download-tdlibfor the terminal/macOS build path. - Build TDLib locally for iOS and iOS Simulator from the TDLib source commit matching TDLib
1.8.29. - Build
tele-ios-ffiwithtele-core/tdlib-localandLOCAL_TDLIB_PATH. - Package the resulting Rust FFI library and TDLib dylib into the iOS app/XCFramework path.
The TDLib source commit used for 1.8.29 is:
af69dd4397b6dc1bf23ba0fd0bf429fcba6454f6
This can be checked with:
npm info prebuilt-tdlib@td-1.8.29 tdlib --json
Build local TDLib artifacts:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/build-tdlib-ios.sh
This writes local, untracked outputs to:
.build/tdlib-ios/iphoneos/
.build/tdlib-ios/iphonesimulator/
Build the real iOS FFI path against local TDLib:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/build-ios-ffi-with-local-tdlib.sh
or for a device target:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer IOS_RUST_TARGET=aarch64-apple-ios scripts/build-ios-ffi-with-local-tdlib.sh
Package the real FFI path for the Swift app and build the simulator .app:
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/build-ios-real-ffi-xcframework.sh
TELE_IOS_USE_LOCAL_FFI=1 DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/build-ios-simulator-app.sh
Known local prerequisites:
- Xcode with the iOS SDK installed.
- Homebrew build tools:
brew install cmake gperf coreutils. - Rust iOS targets:
rustup target add aarch64-apple-ios-sim aarch64-apple-ios. scripts/build-tdlib-ios.shbuilds only the required OpenSSL platforms through TDLib's vendoredPython-Apple-supportflow, with a local patch for the simulator target triple under Xcode 26.- TDLib CMake uses
TDLIB_IOS_DEPLOYMENT_TARGET=17.0by default to match the Swift package minimum iOS version. - TDLib's
prepare_cross_compilingtarget is run as a host-side generation step before cross-compiling, so generated TL/MIME sources exist for the iOS build.
Example local blocker if these tools are missing:
Required tool not found: cmake
CMake 4.x compatibility is handled by passing -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to TDLib's configure step.