Package-level declarations
AssetPacks is the entry point: it shares one fetch per pack, verifies each pack against its assetdropkit.json manifest and reads files through a PackSource (PlayAssetPacks on Android, AppleStoreSource on iOS, LocalPacks in debug builds). Start with the README quickstart.
AssetPacks is the entry point: it shares one fetch per pack, verifies each pack against its assetdropkit.json manifest and reads files through a PackSource (PlayAssetPacks on Android, AppleStoreSource on iOS, LocalPacks in debug builds). Start with the README quickstart.
AssetPacks is the entry point: it shares one fetch per pack, verifies each pack against its assetdropkit.json manifest and reads files through a PackSource (PlayAssetPacks on Android, AppleStoreSource on iOS, LocalPacks in debug builds). Start with the README quickstart.
Types
What the app's Swift adapter (templates/ios/AssetDropAdapter.swift) reports for one call. Call one of onFinished, onFailed, onPending or onNotDownloaded to end it; anything after the first ending call is ignored. Plain methods rather than lambdas, so progress ticks box no numbers and nothing trips Swift 6's Sendable checks.
The app's Swift adapter over the AssetDropKit Swift package (Apple-hosted packs on iOS 26+, On-Demand Resources on iOS 17 and 18). The app framework re-exports this library (export("com.vocabloot:assetdropkit")) so Swift sees these names.
Apple's stores through the app's Swift adapter: Apple-hosted packs on iOS 26 and later, On-Demand Resources on iOS 17 and 18. Callbacks may arrive on any thread; each call resumes once, and file bytes are copied out of NSData on dispatcher straight away.
The app's entry point: one shared fetch per pack, an integrity check against the pack's assetdropkit.json, and reads on dispatcher, never the caller's thread.
Packs shipped inside the APK as plain assets (assets/<packId>/...), for debug builds: an APK installed with installDebug has no asset packs. Add the pack's folder to the debug source set's assets; release builds use PlayAssetPacks.
VerifiedMarkers for one process: each launch verifies each pack once.
Packs read from root/<packId>/ on disk, for debug builds and tests. A fetch waits delayMillis (showing Downloading) and every failEvery-th fetch fails as NoNetwork (0 never fails). Like a store, nothing is readable before a fetch; remove forgets the fetch and never deletes the files. Release builds never use it.
Cancels the Swift task behind one fetch.
Why a fetch failed, the same on every store. Swift sees camel-case names (.noNetwork).
One store's delivery: Play, Apple's, or local files. Paths are inside the pack, without the <packId>/ prefix; each source adds it. Apps use AssetPacks, which adds shared fetches and the integrity check on top of a source.
Picks the Android source: packs bundled in the APK in debug builds, Play otherwise.
Google Play Asset Delivery: on-demand asset packs hosted by Play. Each pack is an asset-pack module whose files sit under assets/<packId>/. A sideloaded build gets NeedsPlayConfirmation, never local files.
Play's two dialogs: mobile data for a large pack (WaitingForWifi) and Play's confirmation for an install it does not recognise (NeedsPlayConfirmation). Fetch again after the user answers.
Remembers which pack versions passed the integrity check, so a version is hashed once. Back it with persistent settings to hash once per install instead of once per launch. AssetPacks calls it under its own lock, so an implementation need not be thread-safe.
Properties
True for the states PackSource.fetch returns on: nothing more happens without the user or a new fetch.