Skip to content
pa-jesusfPublic

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

299 Commits

Folders and files

Repository files navigation

Ibili

Native iOS Bilibili client. Architecture: Rust core (core/rust) + Swift/SwiftUI app (ios-app).

See docs/ for full architecture and protocol references.

Prerequisites

brew install xcodegen          # required
brew install xcpretty          # optional: prettier xcodebuild logs
rustup target add aarch64-apple-ios

Xcode 16+ recommended. iOS deployment target: 16.0.

Build an unsigned IPA

./tools/build_unsigned_ipa.sh
# → dist/Ibili-unsigned.ipa

The 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:

  1. cargo build for aarch64-apple-ios → ios-app/Frameworks/IbiliCore.xcframework
  2. xcodegen generate → ios-app/Ibili.xcodeproj
  3. xcodebuild archive with CODE_SIGNING_ALLOWED=NO
  4. Manual Payload/Ibili.app repackage → dist/Ibili-unsigned.ipa

To sideload, sign with your own developer profile (e.g. codesign --force --sign "<id>") or a tool such as AltStore.

Just rebuild the Rust core

./tools/build_rust_xcframework.sh             # device only
./tools/build_rust_xcframework.sh --with-sim  # device + simulator

Open in Xcode

cd ios-app && xcodegen generate && open Ibili.xcodeproj

Feature snapshot

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)

Source layout

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

Notes

  • The IPA is unsigned. iOS will not install it without re-signing.
  • Bilibili durl URLs require Referer and a Bilibili User-Agent; the player attaches these via AVURLAsset HTTP header options.
  • TV QR login uses appkey=4409e2ce8ffd12b8. After confirmation the resulting access_token is reused as access_key for app endpoints (feed/index, playurl).
  • Cargo.lock is committed for reproducible builds.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages