I was trying out the new CocoaPods support for Kot...
# kotlin-native
t
I was trying out the new CocoaPods support for Kotlin/Native, so I can include Firebase as a pod on my iOS project. Unfortunately, it looks like subspecs are not supported, which prevents me from adding the Firebase pod. Is there a way to get this working? Or is there an issue I can follow regarding subspecs?
s
Have you tried adding Firebase pod with required subspecs to
Podfile
for your Xcode project?
t
@svyatoslav.scherbina if I add the pod to the Xcode project, will that allow me to use them from my Kotlin/Native module? I would like to use Firebase from my Kotlin code. That's why I tried adding the Firebase pod to the Gradle file.
The Kotlin documentation on CocoaPods says that subspecs are not supported. So I was wondering if there was another way to get it working.
s
if I add the pod to the Xcode project, will that allow me to use them from my Kotlin/Native module?
If you also add the parent pod to Gradle build, then it will likely work.
The Kotlin documentation on CocoaPods says that subspecs are not supported. So I was wondering if there was another way to get it working.
Exactly, that’s why I’m trying to provide you a workaround for this.
t
Thanks @svyatoslav.scherbina, I appreciate your help. The issue I had was that “Firebase/Core” was an invalid pod name because of the “/” character. It returned an error when doing a Gradle sync. I am not sure why, but if I remove the “/” it does work correctly, I think Firebase has another pod called “FirebaseCore”. That one does work correctly and I am able to use it in the Kotlin code.
@svyatoslav.scherbina This is the error I get when doing a Gradle sync after adding “Firebase/Core” to the Gradle file: https://gist.github.com/Thomas-Vos/71674dd5af4cbe0449e5a981d097e0f6
o
@Thomas, I had the same issue, and ended with replacing Firebase pods with
/
by there non-
/
counterparts. How to detect them: run
pod install
in your iOS project, and look into Podfile.lock. It will show you what are the subpods for
Firebase/Core
. It’s
FirebaseCore
and
FirebaseAnalytics
effectively.
👍 1
t
@oleksandr.stepanov thanks, that is really helpful. I managed to get Firebase working in my project now.
👌 1