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

Question: compiling on iOS

Open alexandru-g opened this issue 4 years ago • 4 comments
trafficstars

Is anything extra required to compile a project on iOS (that's using this library). It keeps throwing the ld: framework not found FirebaseFirestore error. I've turned the internet upside down and I can't find anything. Thanks!

alexandru-g avatar Mar 08 '21 17:03 alexandru-g

Have you tried including the Firebase pod?

BTW, this also happens to us, but only when running Unit tests. So frustrating - we can't run iOS tests from the common code

YanivSos avatar Mar 14 '21 11:03 YanivSos

Is anything extra required to compile a project on iOS (that's using this library). It keeps throwing the ld: framework not found FirebaseFirestore error. I've turned the internet upside down and I can't find anything. Thanks!

Usually when you get an error like this, it means the framework is not being included in the compiled ipa. You should have a look at the framework you have included in your project and make sure its set to required and not optional.

Reedyuk avatar May 17 '21 06:05 Reedyuk

I'm having the same issue and I'm a beginner on multiplatform.

https://gist.github.com/gbirk/9689e7a80bb07b61be29326ef2f4a7eb

Adding "implementation("dev.gitlive:firebase-firestore:1.3.1")" throws "ld: framework not found FirebaseFirestore" when building iOS. I already have the Pods installed.

pod 'Firebase/Firestore' pod 'FirebaseFirestoreSwift'

How can I make sure the framework is set as required?

Thanks.

gbirk avatar Jul 28 '21 16:07 gbirk

Same problem here. I tried to include the Pods as dependencies of my shared module and it complains about missing module Firebase.

Any solution to this @Reedyuk? An entry on the docs about building for iOS would be good.

Thanks!

iruizmar avatar Jul 30 '21 20:07 iruizmar

Fixed on 1.8.0 release

Reedyuk avatar Apr 05 '23 10:04 Reedyuk

Fixed on 1.8.0 release

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 FirebaseFirestore

Hi @Reedyuk , I'm still facing this in 1.8.0. Do you have any solution for this?

JasonTranz avatar May 05 '23 06:05 JasonTranz

Try the latest 1.8.1

Reedyuk avatar May 05 '23 06:05 Reedyuk

Try the latest 1.8.1

Sorry, 1.8.1 still facing this problem.

JasonTranz avatar May 05 '23 08:05 JasonTranz

Is this happening when compiling a KMP project or when compiling an xcode project? if its an xcode project, just add firebase via spm and it should work. For kmp, usually i create a standalone universal framework and include it in my project.

Reedyuk avatar May 05 '23 08:05 Reedyuk

Is this happening when compiling a KMP project or when compiling an xcode project? if its an xcode project, just add firebase via spm and it should work. For kmp, usually i create a standalone universal framework and include it in my project.

Oh, I think we discuss it on a different page. I am using this library for KMM project. And I got stuck when integrate firebase library into project. You can see my repository here: https://github.com/jasontran98/crypto-app-with-kmm

When I try to import firebase-firestore library in commonMain in share build gradle, this problem happens

JasonTranz avatar May 05 '23 08:05 JasonTranz

ok i see the potential issue.

You need to run on Kotlin 1.8.20, there is fixes in 1.8.20 which resolves this problem.

change your libs.versions to

kotlin = "1.8.20"

Reedyuk avatar May 05 '23 09:05 Reedyuk