firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
[iOS] cinterop-FirebaseFirestore not found when building for simulator
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
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
~~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.
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.