rickclephas / NSExceptionKt

A Kotlin Multiplatform Library to improve crash reports on Apple platforms
MIT License
181 stars 12 forks source link

No such module 'NSExceptionKtCrashlytics' #28

Closed haydenkaizeta closed 3 months ago

haydenkaizeta commented 3 months ago

Error when compiling main swift class:

iosApp.swift:5:8: No such module 'NSExceptionKtCrashlytics'

iosApp.swift:

import UIKit
import SwiftUI
import ComposeApp
import FirebaseCore
import NSExceptionKtCrashlytics

@main
struct iosApp: App {
    init() {
        FirebaseApp.configure()
        NSExceptionKt.addReporter(.crashlytics(causedByStrategy: .append))
        MainKt.ContextInit()
        KoinKt.doInitKoin()
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

build.gradle.kts:

listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64()
).forEach {
        it.binaries.framework {
            isStatic = true
            export("com.rickclephas.kmp:nsexception-kt-core:1.0.0-BETA-1")
        }
}

        val iosX64Main by getting
        val iosArm64Main by getting
        val iosSimulatorArm64Main by getting
        val iosMain by getting {
            dependencies {
                // ios ktor engine impl
                implementation(libs.ktor.client.darwin)

                // crashlytics special exception handling
                api(libs.nsexception) // com.rickclephas.kmp:nsexception-kt-core:1.0.0-BETA-1
            }
        }
haydenkaizeta commented 3 months ago

Ah on closer examination I realize I needed the SPM dep. Is there a cocoapods distribution?

rickclephas commented 3 months ago

Ah on closer examination I realize I needed the SPM dep. Is there a cocoapods distribution?

No a CocoaPods distribution isn't provided