flower icon indicating copy to clipboard operation
flower copied to clipboard

iOS support in multiplatform

Open lmbotero opened this issue 11 months ago • 2 comments

Hi, I'm trying to add Flower to my multiplatform project (JVM, Android, and iOS). Everything seems to work well if I only declare the Android and JVM source sets in Gradle, but if I add the following configuration I get an error syncing Gradle (Everything works well if I remove the iOS SourceSets or the flower dependency)

    val iosX64Main by getting
    val iosArm64Main by getting
    val iosSimulatorArm64Main by getting
    val iosMain by creating {
        dependsOn(commonMain)
        iosX64Main.dependsOn(this)
        iosArm64Main.dependsOn(this)
        iosSimulatorArm64Main.dependsOn(this)
        ...
    }

Execution failed for task ':composeApp:transformIosMainCInteropDependenciesMetadataForIde'.

Could not resolve all files for configuration ':composeApp:iosX64CompilationDependenciesMetadata'. Could not find io.github.hadiyarajesh.flower-ktorfit:flower-ktorfit-iosx64:3.1.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/io/github/hadiyarajesh/flower-ktorfit/flower-ktorfit-iosx64/3.1.0/flower-ktorfit-iosx64-3.1.0.pom - https://repo.maven.apache.org/maven2/io/github/hadiyarajesh/flower-ktorfit/flower-ktorfit-iosx64/3.1.0/flower-ktorfit-iosx64-3.1.0.pom - https://maven.pkg.jetbrains.space/public/p/compose/dev/io/github/hadiyarajesh/flower-ktorfit/flower-ktorfit-iosx64/3.1.0/flower-ktorfit-iosx64-3.1.0.pom Required by: project :composeApp > io.github.hadiyarajesh.flower-ktorfit:flower-ktorfit:3.1.0

Possible solution:

  • Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

More than an issue I want to know if is there currently supporting iOS in multiplatform projects.

Thanks!

lmbotero avatar Mar 04 '24 22:03 lmbotero

@DatL4g can you check on this?

hadiyarajesh avatar Mar 05 '24 12:03 hadiyarajesh

The project is configured correctly, that means iOS targets are setup up to build and publish.

@hadiyarajesh The publish workflow however does not support building for iOS and macOS.
Simply change https://github.com/hadiyarajesh/flower/blob/master/.github/workflows/publish-release.yml#L15 this to macos-latest (This supports all targets, even linux, windows, etc...).

Additionally the Ktorfit module needs to be updated, I have no time to do this but the migration should not be that difficult.

DatL4g avatar Mar 05 '24 13:03 DatL4g