https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Mustafa

05/12/2020, 1:16 PM
Anyone using Firestore here? I saw there was an unsupported kmp Firestore library but was wondering if anyone had any thoughts on it or whether REST API would be better.
s

Sam

05/12/2020, 1:25 PM
I use a reader/listener interface declared in my common code. Then I just provide an object that conforms to that from my app code. On iOS it is written in swift and Android, Kotlin. Both talk to firebase natively using the platform libs. I know others have gone the cocoapods route for iOS and directly call firebase from expect/actual classes. I believe there’s a kmp wrapper floating around. I’m not sure how mature it is.
❤️ 1
m

Mustafa

05/12/2020, 1:27 PM
Thanks a lot. Do you have a link to anyones public project using either of the aforementioned techniques? Would be super helpful.
k

kpgalligan

05/12/2020, 7:03 PM
We have one, but it’s aging. We don’t really use firestore so we haven’t kept it up. I published it mostly in support of a talk I was giving about writing libraries: https://github.com/touchlab/FirestoreKMP
We ran into issues using the kotlin cocoapods plugin and firebase, so we had a somewhat more manual route to generating interop definitions
m

Mustafa

05/13/2020, 2:27 AM
Right. I tried that out last night. Not sure I want to add a library knowing it won't be supported. The Firestore versions being used are a few versions behind already. Thanks for the idea though. Personally I think I will use REST API so I'm not married to Firebase.
7 Views