firebase-kotlin-sdk icon indicating copy to clipboard operation
firebase-kotlin-sdk copied to clipboard

Can't run iOS App: :shared:linkDebugFrameworkIos FAILED

Open SebRenon opened this issue 4 years ago • 6 comments
trafficstars

Hi,

I'm new to KMM and iOS development so maybe I'm missing something but as soon as I integrate the firebase KMM library, the iOS app stops building.

Issue

I'm not able to start the iOS app after adding Firebase Auth dependency. I'm getting the following error:

> Task :shared:linkDebugFrameworkIos FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: framework not found FirebaseAuth

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIos'.
> Compilation finished with errors

What I did

I created a new KMM project via Android Studio and only added a dependency to Firebase Auth in build.gradle.kts (:shared):

val commonMain by getting {
            dependencies {
                implementation("dev.gitlive:firebase-auth:1.3.1")
            }
        }

I use 1.3.1 because 1.4.0 and 1.4.1 don't seem to work for Android.

Thank you for your help!

SebRenon avatar Aug 07 '21 16:08 SebRenon

Same error here!

mistralaix avatar Aug 10 '21 14:08 mistralaix

@SebRenon @mistralaix Not sure - but try to add

pod("FirebaseAuth")

i.e

cocoapods {
        summary = ""
        homepage = ""
        frameworkName = ""
        ios.deploymentTarget = "13.2"

//        pod("FirebaseFirestore")
       pod("FirebaseAuth")
    }

YanivSos avatar Aug 19 '21 13:08 YanivSos

I replicated this, adding the line above will solve.

You will need the cocoapods-generate gem installed for it to work

pauldavies83 avatar Sep 06 '21 09:09 pauldavies83

adding pod("FirebaseAuth") to my library which uses dev.gitlive:firebase-auth:1.4.3 gives me compile error

java.lang.Error: Linking globals named 'knifunptr_cocoapods_FirebaseAuth3_FIRAuthErrorDomain_getter': symbol multiply defined!

sdelaysam avatar Nov 01 '21 09:11 sdelaysam

Have you managed to solve the issue?

antanas-radzevicius-tg avatar Sep 10 '22 14:09 antanas-radzevicius-tg

use 1.8.0 release please

Reedyuk avatar Apr 05 '23 10:04 Reedyuk