Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve com.linecorp.abc:kmm-notifications:0.4.1 #1

Open
Kashif-E opened this issue Apr 15, 2022 · 5 comments
Open

Could not resolve com.linecorp.abc:kmm-notifications:0.4.1 #1

Kashif-E opened this issue Apr 15, 2022 · 5 comments

Comments

@Kashif-E
Copy link

Hey! i am trying to use the latest version of kmm-notifications everything is work in common main and android main but when i try to add the dependency to ios main its not unable to resolve.

here is the code for my build.gradle file.

plugins {
    kotlin("multiplatform")
    kotlin("native.cocoapods")
    kotlin(KotlinPlugins.serialization) version Kotlin.version
    id("com.android.library")

}

version = "1.0"
val abcNotifications = "com.linecorp.abc:kmm-notifications:0.4.1"
kotlin {
    android()
    iosX64()
    iosArm64()
    iosSimulatorArm64()



    cocoapods {
        summary = "Some description for the Shared Module"
        homepage = "Link to the Shared Module homepage"
        ios.deploymentTarget = "14.1"
        podfile = project.file("../markazSupplierIos/Podfile")

        framework {
            baseName = "shared"
        }
    }

    sourceSets {

        val commonMain by getting {
            dependencies {
                implementation(Ktor.core)
                implementation(Ktor.clientSerialization)
                implementation(Kotlinx.datetime)
                implementation(Koin.koin)
                implementation(Ktor.ktorLogging)
                implementation(Firebase.auth)
                implementation(MultiplatformSettings.core)
                implementation(MultiplatformSettings.coroutines)
                implementation(abcNotifications)
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1-native-mt")
                implementation("io.islandtime:core:0.6.3")


            }
        }
        val androidMain by getting {
            dependencies {
                implementation(Ktor.android)
                implementation(Koin.koinAndroid)
                implementation(Ktor.androidLogging)
                runtimeOnly(Ktor.okhttp)
                implementation(Datastore.datastore)
                implementation(abcNotifications)
                api(abcNotifications)
                implementation(MultiplatformSettings.datastore)

            }
        }
        val commonTest by getting {
            dependencies {
                implementation(kotlin("test"))

            }
        }


        val androidTest by getting
        val iosX64Main by getting
        val iosArm64Main by getting
        val iosSimulatorArm64Main by getting
        val iosMain by creating {
            dependencies {
                implementation(Ktor.ios)

                implementation(abcNotifications)
                api(abcNotifications)


            }
            dependsOn(commonMain)
            iosX64Main.dependsOn(this)
            iosArm64Main.dependsOn(this)
            iosSimulatorArm64Main.dependsOn(this)
        }
        val iosX64Test by getting
        val iosArm64Test by getting
        val iosSimulatorArm64Test by getting
        val iosTest by creating {
            dependsOn(commonTest)
            iosX64Test.dependsOn(this)
            iosArm64Test.dependsOn(this)
            iosSimulatorArm64Test.dependsOn(this)
        }
    }
}

android {
    compileSdk = 31
    sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
    defaultConfig {
        minSdk = 21
        targetSdk = 31
    }
}

here is the message i am getting

Could not resolve com.linecorp.abc:kmm-notifications:0.4.1

Could not resolve com.linecorp.abc:kmm-notifications:0.4.1.
Required by:
    project :shared

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

Any help will be appreciated

@shivamkanodia9143
Copy link

did you find any solution?

@Kashif-E
Copy link
Author

Couldnt find any solution @shivamkanodia9143

@shivamkanodia9143
Copy link

@Kashif-E then how did you implement push notifications for ios using kmm, with or without using this lib?

@Kashif-E
Copy link
Author

I went with native implementation for both platforms rather than shared @shivamkanodia9143

@vdcast
Copy link

vdcast commented Feb 13, 2024

I went with native implementation for both platforms rather than shared @shivamkanodia9143

cool bro! would you be able to share the code of implementation for Android and IOS?
I guess you're using expect/actual mechanism.

I'm still curious - were you able to sent notifications from background services on IOS and Android?
For example, you have timer for 1 minute and you want to notify user after 1 minute is gone (doesn't matter App is active or not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants