Having an issue with setuping the CrashKios for my...
# multiplatform
p
Having an issue with setuping the CrashKios for my project. Can someone please help? Followed the touchlab guide except for step 1 (Add Crashlytics to Your Apps) because I still don’t have a firebase account for my project - just want to add and setup the library. I build static frameworks so I don’t need dSYM but for some reason I get this error
Copy code
Undefined symbols for architecture arm64:
  "_FIRCLSExceptionRecordNSException", referenced from:
      _co_touchlab_crashkios_crashlytics_FIRCLSExceptionRecordNSException_wrapper0 in shared(result.o)
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in shared(result.o)
  "_OBJC_CLASS_$_FIRExceptionModel", referenced from:
      objc-class-ref in shared(result.o)
  "_OBJC_CLASS_$_FIRStackFrame", referenced from:
      objc-class-ref in shared(result.o)
ld: symbol(s) not found for architecture arm64
My gradle for the shared module:
Copy code
.......
kotlin {
    targetHierarchy.default()

    android {
        compilations.all {
            kotlinOptions {
                jvmTarget = "11"
            }
        }
    }

    val xcf = XCFramework()
    listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach {
        it.binaries.framework {
            baseName = "shared"
            isStatic = true
            xcf.add(this)
        }
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation(libs.touchlab.crashkios)
            }
        }
    }
}
.....
CrashKios version 0.8.2 Kotlin 1.8.22
r
That would be expected since you haven't added the Crashlytics library. CrashKiOS is relying on the Crashlytics library to provide these symbols.
p
Thanks - that piece of puzzle was missing for me!
👍 1