Having some issues with the cocoapods integration....
# kotlin-native
k
Having some issues with the cocoapods integration. Anybody know where that plugin is kept, and best place to file bugs? I’m pretty sure it’s in the “main” kotlin repo and not native, but having some trouble tracking it down and want to make sure it’s not in a special place.
b
try the mpp plugin? i think it's dsl that's part of that plugin
k
I assume mpp plugin is in the main kotlin repo?
b
yep!
k
In any case, Firebase has specific dependencies as
pod 'Firebase/Core'
, but the cocoapods kotlin plugin doesn’t allow
/
, so I’m stuck right out of the gate. Ugh. I searched the kotlin repo for
cocoapods
but nothing came up. I’m on master, but maybe need to be on release branch or some such
b
Can you just include
Firebase
?
k
That’s what I’m going to try now. Looks like that’s doable, although that’ll be a monster header (but hopefully excess gets compiled out)
message has been deleted
Doing actual client work instead of samples and blog posts. Interesting times!
🙌 2
Nah. Didn’t work. I’m sure that’s because they’re subspecs, which aren’t supported. Could probably do this
pod 'FirebaseCore', :path => '/path/to/firebase-ios-sdk
pod 'FirebaseMessaging', :path => '/path/to/firebase-ios-sdk'
, but
path
isn’t supported in kotlin gradle plugin
b
ah if subspecs aren't supported, then it won't work
k
That is frustrating. I could clone firebase and add without subspecs, but the gradle plugin wouldn’t support that. I manually built the interop def yesterday, but was getting my hopes up about integratino
b
Yeah subspecs are common place. Doing CocoaPods without using the CocoaPods library is an interesting decision. I guess it means you don't have to ship ruby with Kotlin
k
The xcode plugin uses this: https://github.com/CocoaPods/Xcodeproj. It is frustrating to rely on ruby and that being installed. I’m maybe trying Jruby and running in memory, but not super high on the todo list
You think cocoapods is going to start declining between SPM and Carthage?
b
SPM isn't fully featured enough (doesn't support vendored libraries yet; so no K/N for example). Lots of people use Carthage, but CocoaPods is still super popular
IIRC CocoaPods has native dependencies (I.e. gems that compile things). Not sure JRuby will work with those
Maybe though!
k
Ah, sounds horrible
I’m super worried now. I added the cinterop manually and added the firestore pods to the Podfile instead of the kotlin config, then pointed paths. Intellij can’t see the generated interop, but it’s there and compiles. Letting Xcode do it’s monster build now.
I’m worried because the interop worked way too fast.
t
Ruby is preinstalled on macos and most devs use Homebrew anyway
k
“Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages.” https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_beta_4_release_notes
I’ve also run into issues where people had odd versions installed , and the config didn’t work properly. However, it’s not a huge priority
i
Anybody know where that plugin is kept, and best place to file bugs? I’m pretty sure it’s in the “main” kotlin repo and not native, but having some trouble tracking it down and want to make sure it’s not in a special place.
Yes, it's the main Kotlin repo: https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/cocoapods/KotlinCocoapodsPlugin.kt. As for bugs, our YouTrack (https://youtrack.jetbrains.com/issues/KT) is the most suitable place for filing them. Subspecs are not supported currently but there is a workaround: https://kotlinlang.slack.com/archives/C3SGXARS6/p1556475587073500. I've created a ticket to track this problem: https://youtrack.jetbrains.com/issue/KT-32750. As for local pods, the Gradle plugin doesn't provide a way to declare them directly but you can use an approach described here: https://kotlinlang.slack.com/archives/C3SGXARS6/p1559720360005600?thread_ts=1559718499.005400&cid=C3SGXARS6.
🙏 2