Commit graph

59 commits

Author SHA1 Message Date
KhooLy
afea67d02f fix: resolve FluxaCore/FluxaShared type identity mismatch after moving Apple snapshot DTOs
Some checks failed
Apple / iOS simulator (push) Has been cancelled
Apple / tvOS simulator (push) Has been cancelled
Platform Verification / Android shared modules (push) Has been cancelled
Kotlin/Native generates distinct Swift types for a class depending on
whether it's imported directly from its owning module or transitively
re-exported through another framework, so files consuming these DTOs
via FluxaShared's re-export of core no longer matched the FluxaCore
type Loader/ResourceLoader now return directly. Route Bootstrap and
HomeEffectHandler through FluxaCore consistently, and add an explicit
FluxaCore->FluxaShared stream conversion where DetailStartup crosses
back into FluxaApple.shared's Shared-typed API.
2026-07-28 19:42:59 +03:00
KhooLy
a0db322fed fix: move Apple catalog/detail/discover/search snapshot DTOs from shared to core
Xcode's embedAndSignAppleFrameworkForXcode task for :shared: is
intermittently disabled by the Kotlin Gradle Plugin's own IDE/index-build
detection (onlyIf 'Task is enabled' is false), silently skipping the
framework embed and leaving these types unavailable to Swift. core's
framework already embeds reliably for iOS (matching tvOS), so these plain
DTOs move there instead; the Compose-dependent DataSource wrappers stay in
shared, which already re-exports core.
2026-07-28 19:04:13 +03:00
KhooLy
b44ebec2d9 debug: add --info logging to the shared framework embed task to diagnose why Xcode's build skips it 2026-07-28 18:27:53 +03:00
KhooLy
ede8260d1b fix: force embedAndSignAppleFrameworkForXcode to rerun, avoiding a stale Gradle up-to-date skip 2026-07-28 17:39:32 +03:00
KhooLy
e36a43bae5 Move shared app policies into fluxa core 2026-07-22 16:56:20 +03:00
KhooLy
0860871297 Exclude the iOS-only plugin repository manager from tvOS, cache Rust on failure
Some checks failed
Apple / iOS simulator (push) Has been cancelled
Apple / tvOS simulator (push) Has been cancelled
Platform Verification / Android shared modules (push) Has been cancelled
FluxaApplePluginRepositoryManager.swift only has iOS callers and
references the iOS-only FluxaApplePluginsEffectHandler, so it fails to
compile for tvOS the same way the addon-store files already excluded
above do. Add it to the same exclude list.

Also set cache-on-failure on both Swatinem/rust-cache steps: since every
Apple CI run this session failed at a later step, the Rust build cache
was never saved, so each retry recompiled the whole dependency tree
(~15-25 min) from scratch instead of reusing what already built fine.
2026-07-20 18:05:43 +03:00
KhooLy
0611ad7b22 Exclude FluxaAppleAddonStoreManager.swift from the tvOS target
It imports FluxaShared, which the shared Gradle module never builds
for tvOS (tvOS stays native SwiftUI per the project's CMP/KMP
migration plan). The other four AppleCore files with the same
dependency are already excluded here; this one was added by the
recent Addon Store wiring work and missed the same exclusion.
2026-07-20 17:33:59 +03:00
KhooLy
3801e75b1a Pass seasonsCount to PlayerContentUiModel in the iOS playback presenter
Kotlin default parameter values aren't exposed through the generated
Swift bindings, so every PlayerContentUiModel field is required from
Swift regardless of its Kotlin-side default. This call site predates
the seasonsCount field and never got updated, which only surfaced now
that Apple CI's build actually reaches Swift compilation for this file.
2026-07-20 17:30:02 +03:00
KhooLy
97628a1fe2 Force SDKROOT per Rust target when building inside an Xcode script phase
The Xcode "Build Fluxa Rust Core" run-script phase runs this script
with SDKROOT already exported for whichever platform Xcode is currently
building (e.g. iphonesimulator for the FluxaIos scheme). That ambient
value leaks into cc's default sysroot for every target this script
loops over, including unrelated ones, so linking the aarch64-apple-tvos
build picked up an iphonesimulator libiconv and failed with "building
for tvOS, but linking in dylib built for iOS-simulator". Override
SDKROOT per target using the same SDK path already resolved for
bindgen, so each cargo build gets a sysroot matching its own target.
2026-07-20 17:06:10 +03:00
KhooLy
71e5d90b90 Set an iOS/tvOS deployment target when building fluxa_core per-target
build_rust_core never set IPHONEOS_DEPLOYMENT_TARGET/TVOS_DEPLOYMENT_TARGET,
so rustc fell back to its ancient default (iOS 10.0) when linking for
aarch64-apple-ios etc. That's too old for the rquickjs-sys objects, which
need ___chkstk_darwin support only available at a modern deployment
target, so linking fluxa_core failed with an undefined symbol.
build_streaming_engine already sets IPHONEOS_DEPLOYMENT_TARGET (default
18.5) for exactly this reason — mirror it here for both iOS and tvOS.
2026-07-20 16:36:37 +03:00
KhooLy
c0da06c05d Fix follow-up bug from the bindgen_env unbound-variable patch
The \${arr[@]:-} default-value form avoids bash 3.2's unbound-variable
error on an empty array, but on macOS's stock bash it still expands to
a single empty-string word, so `env "" cargo build ...` tried to exec
an empty command name and failed with exit 127. Build the cargo
invocation as an array and only wrap it with `env` when bindgen_env
actually has entries, avoiding any [@] expansion of an empty array.
2026-07-20 16:18:20 +03:00
KhooLy
33a88a8b86 Fix unbound-variable crash in the host Rust core build on macOS CI
macOS's stock /bin/bash is 3.2, which raises "unbound variable" under
set -u when expanding an empty array via \${arr[@]} even with the [@]
syntax. build_rust_core hits this on the host-only build call (no
--target flag), where bindgen_env stays empty. Use the \${arr[@]:-}
default-value form, the standard bash 3.2-safe workaround.
2026-07-20 15:49:51 +03:00
KhooLy
5cb1bb75db Wire Addon Store screen to real networking on iOS
FluxaAppleAddonStoreManager fetches manifests over URLSession and
persists the local addon list plus enabled/disabled state via
FluxaAppleAddonConfigurationStore. FluxaAppleAddonStoreStartup routes
AppleAddonStoreActionSnapshot actions from the shared UI to it and
pushes merged state back to Kotlin. FluxaIosApp constructs and
registers it, restoring/refreshing on launch. Users can now actually
add, toggle, reorder, and remove Stremio addons on iOS.
2026-07-20 15:05:37 +03:00
KhooLy
6b218ba97f Track enabled/disabled addon state and respect it when fetching content
FluxaAppleAddonConfigurationStore gains a disabled-addon set and
enabledAddonUrls(); Home/Search/Discover/Detail now fetch from
enabledAddonUrls() instead of the raw configured list, so disabling an
addon in the store actually stops it from being queried.
2026-07-20 15:05:25 +03:00
KhooLy
f72b6f1623 Wire Plugins settings screen to real networking on iOS
FluxaApplePluginsStartup routes ApplePluginsActionSnapshot actions
from the shared UI to FluxaApplePluginRepositoryManager and pushes
merged state back to Kotlin. FluxaIosApp constructs and registers it
alongside the other feature startups, restoring persisted repos on
launch.
2026-07-20 14:43:50 +03:00
KhooLy
270d82d6cd Add FluxaApplePluginRepositoryManager owning a dedicated plugin engine
Mirrors Android's PluginRepositoryManager: owns its own headless
runtime instance, dispatches repo/scraper actions, persists state via
UserDefaults, and exposes scraper settings layout and execution.
2026-07-20 14:43:43 +03:00
KhooLy
2cfc819951 Add iOS headless-effect handler for fetchPluginManifest
Fetches plugin repository manifests over URLSession and parses them
via coreInvoke, matching Android's FluxaAndroidHeadlessEnvironment
fetchPluginManifest behavior.
2026-07-20 14:43:41 +03:00
KhooLy
cbbe4f488f Add Swift PluginHttpClient implementation for iOS plugin scrapers
Implements the generated PluginHttpClient callback interface
synchronously via URLSession, with an SSRF guard (scheme allow-list
plus resolved-address blocklist) mirroring Android's PluginNetGuard.
2026-07-20 14:43:39 +03:00
KhooLy
7d3456ec7b Regenerate real uniffi Swift bindings for the ios Cargo feature
Replaces the checked-in 6-function stub with actual uniffi-bindgen
output, exposing PluginHttpClient, PluginHttpRequest/Response,
executePluginScraper, getPluginScraperSettingsLayout, and coreInvoke
to Swift for the first time.
2026-07-20 14:43:34 +03:00
KhooLy
cfd7a4b32b Enable rquickjs bindgen against the correct Apple SDK per target
rquickjs-sys has no prebuilt FFI bindings for iOS/tvOS targets, so
bindgen needs the matching SDK sysroot (iphoneos/iphonesimulator/
appletvos/appletvsimulator) and clang target triple per cross-compiled
target, or it silently uses the host's own headers and fails. Unverified
here — no Xcode/macOS available in this environment; needs confirming
on a real Mac before relying on it.
2026-07-20 03:24:44 +03:00
KhooLy
7085c5c7bf Fix iOS Kotlin interop build
Some checks failed
Apple / iOS simulator (push) Has been cancelled
Apple / tvOS simulator (push) Has been cancelled
Platform Verification / Android shared modules (push) Has been cancelled
2026-07-16 16:22:41 +03:00
KhooLy
bd780396d1 Complete shared KMP and CMP migration 2026-07-16 15:50:35 +03:00
KhooLy
7d431cb6cb Avoid capturing app state in callbacks 2026-07-14 21:08:15 +03:00
KhooLy
278f0f1f9b Avoid capturing app value in callback 2026-07-14 20:42:54 +03:00
KhooLy
b5510e3b84 Import shared iOS bridge 2026-07-14 20:15:30 +03:00
KhooLy
03edaa138d Fix iOS detail bridge compilation 2026-07-14 19:48:12 +03:00
KhooLy
be954edd4b Fix Apple host compilation 2026-07-14 19:13:11 +03:00
KhooLy
e747ca3d0e Fix Apple streaming engine CI packaging 2026-07-14 18:41:00 +03:00
KhooLy
67a20b284e Fix Apple CI configuration 2026-07-14 18:23:43 +03:00
KhooLy
20476761a9 Migrate shared UI and Apple playback to KMP 2026-07-14 18:14:18 +03:00
KhooLy
a9f6e65b36 Migrate shared Apple UI bridges to KMP 2026-07-14 16:55:16 +03:00
KhooLy
909906fab3 Build real Stremio login for iOS Auth, Keychain-backed session storage
Fixes AppleAuthDataSource: continueWithNuvio/continueWithStremio/
continueWithoutAccount were incorrectly routed through Swift
notifications - Android handles all three as pure local UI-state
transitions (no network), so this matches that instead of adding
unnecessary indirection.

submit() for the Credentials stage now posts a real request that
FluxaAppleAuthStartup.swift picks up: FluxaAppleStremioAuthClient
mirrors StremioService.kt's api.strem.io/api/login and /api/register
endpoints via URLSession, and the resulting session (id/email/authKey)
is persisted through FluxaAppleAuthStore using the Keychain generic-
password API (kSecClassGenericPassword, accessible-after-first-unlock),
not UserDefaults - this is the first credential-bearing data iOS
persists, unlike the existing UserDefaults-backed local stores.

Nuvio login/import is out of scope here: Android's version pulls
profile/addons/library/progress/history/collections through
NuvioAccountImportCoordinator, which needs library and addon-store
integration iOS doesn't have yet. The Nuvio stage transition works
(continueWithNuvio), but submitting Nuvio credentials currently has no
Swift listener - same "reachable but inert" scope already established
for AddonStore.

The error-state message on failed Stremio login is a hardcoded English
string rather than routed through AppStrings, since calling Kotlin's
AppStrings.t() from pure Swift needs framework-export verification I
can't perform without Xcode.

Caveat: this Swift code (Keychain access, URLSession networking) is
unverified - no Xcode/macOS toolchain available in this environment.
Only the Kotlin side (AppleAuthDataSource, all Gradle targets) is
compile-checked. Needs a real Xcode build and device/simulator test
before shipping.
2026-07-14 13:56:30 +03:00
KhooLy
0497395057 Add Apple discover effect handler 2026-07-13 17:48:54 +03:00
KhooLy
c4123c77e3 Add shared Apple search flow 2026-07-13 17:39:50 +03:00
KhooLy
0d438b2edb Fix Apple catalog startup actor isolation 2026-07-13 17:15:49 +03:00
KhooLy
eca5306fa6 Route Apple catalog selections to shared details 2026-07-13 16:21:16 +03:00
KhooLy
834fdc7980 Add Apple detail metadata effect 2026-07-13 16:14:58 +03:00
KhooLy
7b13760f2b Silence Apple runtime teardown warning 2026-07-13 16:10:42 +03:00
KhooLy
3aefc7654d Fix Apple addon catalog resolver build 2026-07-13 16:09:09 +03:00
KhooLy
58ef97d97c Initialize Apple runtime before catalog startup 2026-07-13 16:06:21 +03:00
KhooLy
a33abcae83 Route Apple home loading through headless effects 2026-07-13 16:05:18 +03:00
KhooLy
d4f5dfd49f Add Apple addon catalog bootstrap 2026-07-13 15:59:01 +03:00
KhooLy
efb6b0c233 Load Apple catalogs into shared home 2026-07-13 15:53:53 +03:00
KhooLy
9b2593e5fd Add Apple platform effect executor 2026-07-13 15:50:42 +03:00
KhooLy
7a3a7db34a Add Apple headless effect coordinator 2026-07-13 15:48:53 +03:00
KhooLy
5cc93c4d9f Initialize Apple Rust headless runtime 2026-07-13 15:46:26 +03:00
KhooLy
cb99b2b1e8 Add shared catalog action boundary 2026-07-13 15:08:20 +03:00
KhooLy
ae73947f4d Link UIKit as an SDK framework 2026-07-13 14:45:57 +03:00
KhooLy
72aa45b8c7 Support macOS Bash in Rust build script 2026-07-13 14:16:15 +03:00
KhooLy
091eaeff87 Bootstrap Apple Rust core before Xcode 2026-07-13 14:10:01 +03:00