Skip to content

iOS - framework 'FirebaseMessaging' not found (using SPM) #158

@guyaumetremblay

Description

@guyaumetremblay

KMPNotifier and Kotlin version:
kmpnotifier version: 1.6.0, kotlin version: 2.2.0

Describe the bug
FirebaseMessaging is installed using SPM in Xcode. The project doesn't use Cocoapod at all.
Everything work well until I try to run the kotlin unit tests using an iOS target or build a release. Now, I get the linker error

framework 'FirebaseMessaging' not found

In which platform bug occurs?
iOS

To Reproduce
Configure the lib and install firebase using SPM in Xcode.
Create some unit test in commonTest and try to run them targeting iosSimulatorArm64.

Expected behavior
Test should run well

Additional info to help reproduce
My (simplified) config:

listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "Shared"
            isStatic = true

            binaryOption("bundleId", "com.****")

            export(libs.kmpnotifier)
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions