Native iOS Bilibili client. Architecture: Rust core (core/rust) + Swift/SwiftUI app (ios-app).
See docs/ for full architecture and protocol references.
brew install xcodegen # required
brew install xcpretty # optional: prettier xcodebuild logs
rustup target add aarch64-apple-iosXcode 16+ recommended. iOS deployment target: 16.0.
./tools/build_unsigned_ipa.sh
# → dist/Ibili-unsigned.ipaThe app version is split into a marketing version and an integer build number.
Both hard-coded values are maintained in ios-app/project.yml:
MARKETING_VERSION: "0.1.0"
CURRENT_PROJECT_VERSION: "1"Update those two values when releasing a new version, then run
./tools/build_unsigned_ipa.sh without additional arguments.
The installed app exposes both values in 设置 → 关于.
The script runs:
cargo buildforaarch64-apple-ios→ios-app/Frameworks/IbiliCore.xcframeworkxcodegen generate→ios-app/Ibili.xcodeprojxcodebuild archivewithCODE_SIGNING_ALLOWED=NO- Manual
Payload/Ibili.apprepackage →dist/Ibili-unsigned.ipa
To sideload, sign with your own developer profile (e.g. codesign --force --sign "<id>") or a tool such as AltStore.
./tools/build_rust_xcframework.sh # device only
./tools/build_rust_xcframework.sh --with-sim # device + simulatorcd ios-app && xcodegen generate && open Ibili.xcodeproj| Feature | Status |
|---|---|
| TV QR login (扫码登录) | ✅ |
| Logout | ✅ |
| Home recommendation feed | ✅ |
| Search / history / comments | ✅ |
| Native AVPlayer playback | ✅ |
| DASH / HLS proxy playback | ✅ |
| Danmaku / CC subtitles / timeline | ✅ |
| WBI signing | ✅ implemented (not yet used; reserved for web endpoints) |
core/rust/
Cargo.toml (workspace)
crates/ibili_core/ (signers, http, auth, feed, video)
crates/ibili_ffi/ (C ABI: opaque handle + JSON dispatch)
include/ibili.h (umbrella header)
include/module.modulemap
ios-app/
project.yml (XcodeGen)
IbiliApp/Sources/
App/ (entry, RootView, AppSession)
Bridge/ (CoreClient, CoreDTOs, SessionStore)
DesignSystem/ (Theme, GlassSurface, RemoteImage, QR)
Features/Auth/ (LoginView + ViewModel)
Features/Home/ (HomeView + ViewModel + VideoCardView)
Features/Player/ (PlayerView + ViewModel)
Features/Settings/ (app settings)
IbiliApp/Info.plist
Frameworks/IbiliCore.xcframework (generated)
tools/
build_rust_xcframework.sh
build_unsigned_ipa.sh
- The IPA is unsigned. iOS will not install it without re-signing.
- Bilibili
durlURLs requireRefererand a BilibiliUser-Agent; the player attaches these viaAVURLAssetHTTP header options. - TV QR login uses
appkey=4409e2ce8ffd12b8. After confirmation the resultingaccess_tokenis reused asaccess_keyfor app endpoints (feed/index,playurl). Cargo.lockis committed for reproducible builds.