coil-kt / coil

Image loading for Android and Compose Multiplatform.
https://coil-kt.github.io/coil/
Apache License 2.0
10.83k stars 664 forks source link

Adding support for watchOS and tvOS targets #2653

Closed jeantuffier closed 2 weeks ago

jeantuffier commented 2 weeks ago

Is your feature request related to a problem? Please describe.

I'm trying to extend my project to apple watch and apple tv but I see that coil only supports mobile and mac.

// multiplatform.kt, fun Project.addAllMultiplatformTargets
iosX64()
iosArm64()
iosSimulatorArm64()

macosX64()
macosArm64()

Describe the solution you'd like Can we add those targets?

watchosX64(),
watchosArm64(),
tvosX64(),
tvosArm64(),
tvosSimulatorArm64(),

Additional context I get the following error when adding the watch and tv OS targets to my project:

Caused by: org.gradle.api.internal.artifacts.ivyservice.TypedResolveException: Could not resolve all files for configuration ':commonUI:watchosArm64CompilationDependenciesMetadata'.
...
Cause 1: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve io.coil-kt.coil3:coil-compose:3.0.1.
colinrtwhite commented 2 weeks ago

Unfortunately this isn't possible until Compose Multiplatform adds support for these targets, which sounds like it isn't feasible. There are two open tickets to keep an eye on (tvOS, WatchOS). If Compose Multiplatform ships support for these targets then Coil will as well.

jeantuffier commented 2 weeks ago

Aha I get it, too bad for me. Thanks for the quick answer!