-
Notifications
You must be signed in to change notification settings - Fork 6
Building from Source
You need macOS with Xcode, XcodeGen, Node and pnpm (for the iOS web bundle), and Rust nightly with rust-src (for the tvOS engine). MPVKit comes in over Swift Package Manager. No local Stremio install is needed: the fetch script downloads anything it cannot find.
# 1) Streaming-server deps: NodeMobile (tvOS-enabled build from this repo's vendor
# release), server.js (from a local Stremio.app if present, otherwise the public
# CDN), and the bundled subtitle fallback fonts.
./scripts/fetch-server-deps.sh
# 2) iOS only: build the stremio-web bundle
./scripts/build-web.sh
# 3) tvOS only: build the stremio-core engine into an xcframework
# (needs Rust nightly + rust-src)
./scripts/build-core-xcframework.sh
# 4) Generate the project and build (unsigned, for sideloading)
cd app && xcodegen generate
# Full Apple TV build (with torrents):
xcodebuild -scheme StremioXTV -sdk appletvos -destination 'generic/platform=tvOS' -configuration Release CODE_SIGNING_ALLOWED=NO build
# Lite Apple TV build (no embedded server):
xcodebuild -scheme StremioXTVLite -sdk appletvos -destination 'generic/platform=tvOS' -configuration Release CODE_SIGNING_ALLOWED=NO build
# iOS build:
xcodebuild -scheme StremioX -sdk iphoneos -destination 'generic/platform=iOS' -configuration Release CODE_SIGNING_ALLOWED=NO build
# 5) Wrap the built .app into an .ipa
./scripts/repackage-ipa.sh <dir-with-Payload> build/StremioX.ipaserver.js is not committed here because it is the streaming server's own proprietary file. The script prefers a copy from a local Stremio.app (set STREMIO_APP to point at one) and otherwise downloads the standard desktop build from the public CDN, so a fresh clone builds without any local install.
It started out talking to add-ons by hand, which kept getting small things wrong, so it was moved onto stremio-core, the open-source Rust engine. The engine is built as a static library, packaged as StremioXCore.xcframework, and talks to Swift as plain JSON over a C interface (see the core/ folder). The SwiftUI screens send the engine actions and render whatever state it hands back, which is why the behavior lines up with the official app: it is the same engine. There is more in docs/REBASE-stremio-core.md in the repo.
The iPhone and iPad build currently hosts the live web interface in a WKWebView and plays through the same native libmpv player, with the streaming server running through nodejs-mobile. A fully native iOS client on the engine is the next major piece of work.