Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] cinterop-FirebaseFirestore not found when building for simulator #326

Closed
walkingbrad opened this issue Jul 7, 2022 · 9 comments
Closed

Comments

@walkingbrad
Copy link
Contributor

walkingbrad commented Jul 7, 2022

Kotlin 1.6.21
Android Studio Chipmunk 2021.2.1. Patch 1
KMM plugin 0.3.2(212-1.6.10-release-974-IJ)-216
dev.gitlive:firebase-firestore:1.6.1 and am using cocoapods
Xcode 13.4.1
iOS 15.5 simulator

This issue just popped up for me recently in the past week or two. I did upgrade the gradle plugin and Android Studio recently, but nonetheless:

Building for iOS simulator (X64, Intel Mac) fails with this message:

Task :shared:compileKotlinIosX64 FAILED
e: Could not find "dev.gitlive:firebase-firestore-cinterop-FirebaseFirestore" in [{my_project_dir}, /Users/{username}/.konan/klib, /Users/{username}/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.21/klib/common, /Users/{username}/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.21/klib/platform/ios_x64]

Building for iOS device (arm64) works fine.

Possibly related to #325

What I've tried:

  • gradle sync
  • invalidate caches & restart
@walkingbrad
Copy link
Contributor Author

walkingbrad commented Aug 16, 2022

Issue luckily gone in 1.6.2

Not sure what the cause was, but I suspect something to do with dependency versions (kotlin specifically) that were updated/fixed in this release.

EDIT: This apparently only seems to be an issue when running an iOS 15.5 simulator (and maybe others). What does get around this issue is running on iOS 14.5. I'm going to download and try out other os versions to see exactly when the breakage happens.

@walkingbrad
Copy link
Contributor Author

I'm not confident this is a real bug, b/c I've noticed in other instances where building to iOS 15.5 works (maybe on other simulator device types?). I suspect it may be something bad in the cache. So if you're reading this and experience the issue, try clearing caches in Android Studio and/or doing an Xcode clean and/or purging Xcode's DerivedData folder.

@burntcookie90
Copy link

I am seeing this when attempting to run a basic KMM project (only additions from the template are cashapp-molecule and "dev.gitlive:firebase-firestore:1.6.2".

Getting the following:

ld: framework not found FirebaseFirestore

I've cleaned everything that could be cleaned with no luck.

@casvanluijtelaar
Copy link

I'm having the same issue with a basic project using dev.gitlive:firebase-config:1.6.2

Getting similar issue:

ld: framework not found FirebaseABTesting

@casvanluijtelaar
Copy link

@walkingbrad can you reopen this?

@walkingbrad
Copy link
Contributor Author

While both of your issues seem similar, I don't think they're necessarily the same as mine (which is no longer a reproducible issue for me). So I think those should be new issues if the following does not solve them:

@casvanluijtelaar, in your comment on #233, it looks like there is actually a clear underlying cause pointed out by the second error you posted of kotlin.NotImplementedError. I would check if that error string exists in this repo (or find where it is coming from) so you can potentially implement the thing that it is saying needs to be implemented.

@burntcookie90, I would suggest checking out #233 as well. Have you added FirebaseFirestore to the Podfile on the iOS side?

@lammertw
Copy link

I'm getting exactly the same as @casvanluijtelaar: ld: framework not found FirebaseABTesting. I'm using Swift Package Manager in Xcode and no cocoa pods integration in KMM.

@casvanluijtelaar
Copy link

casvanluijtelaar commented Oct 20, 2022

While both of your issues seem similar, I don't think they're necessarily the same as mine (which is no longer a reproducible issue for me). So I think those should be new issues if the following does not solve them:

@casvanluijtelaar, in your comment on #233, it looks like there is actually a clear underlying cause pointed out by the second error you posted of kotlin.NotImplementedError. I would check if that error string exists in this repo (or find where it is coming from) so you can potentially implement the thing that it is saying needs to be implemented.

@burntcookie90, I would suggest checking out #233 as well. Have you added FirebaseFirestore to the Podfile on the iOS side?

the error is being thrown from the Cinterop, not from this package specifically. Right now we cannot build our pod because of this issue

https://github.com/JetBrains/kotlin-native/blob/archive/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt#L261

how did you get remote-config to work with this library?

@casvanluijtelaar
Copy link

minimum repoducable example https://github.com/casvanluijtelaar/kmm-firebase-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants