azemar
12/28/2021, 8:53 PMPaul Weber
12/29/2021, 10:50 AMkpgalligan
12/29/2021, 2:18 PMkpgalligan
12/29/2021, 2:22 PMfirebase-kotlin-sdk
does here, but should probably take a look. I'm trying to avoid being tied to cocoapods, but if you were just making an app as opposed to an sdk, you could let cocoapods handle it (yes, I know the stripe cocoapods integration wasn't working, but that's likely a cocoapods config thing)kpgalligan
12/29/2021, 2:25 PMextern C
blocks), compile it, and insert that binary into your klib. So, if you had raw c/objc code that you wanted in your library, that might be an option (example: https://github.com/touchlab/Kermit/blob/main/kermit-crashlytics-test/build.gradle.kts#L69). It is unsupported because it's in flux and it only popped into existence because we needed it for a particular problem, but it does work.kpgalligan
12/29/2021, 2:26 PMkpgalligan
12/29/2021, 3:44 PMlinkDebugTestIos
. In earlier versions, you could not run command line build/tests if you were using cocoapods dependencies. You had to run from Xcode. SPM would also fail to run command line tests for the same reason. Kotlin builds an exe and doesn't know anything about your spm config, so wiring dependencies in that way would fail for sure.kpgalligan
12/29/2021, 3:46 PMkpgalligan
12/29/2021, 3:51 PMkpgalligan
12/29/2021, 3:51 PMkpgalligan
12/29/2021, 3:55 PMpod gen
bombing, but it works from the command line. My machine? Something with Kotlin 1.6.10? No idea, but need to shelve it for a bit and do "today" stuff.azemar
12/29/2021, 9:10 PMazemar
12/30/2021, 2:54 PMapi
or implementation
called framework
does linking with a bundled binaries. Technically it wouldn't be that different from having to do manual linking or using cocoapods, plus it would require another plugin. However, from consumer perspective I see that as an easier route especially because you no longer need to be aware what frameworks third-party dependency wants you to link for iOS targets.
That's ignoring the fact xcode project would still need to link the framework so I am just brainstorming.kpgalligan
12/30/2021, 3:02 PMkpgalligan
12/30/2021, 3:04 PMkpgalligan
12/30/2021, 3:05 PMcocoapods {
//extra config was here...
framework {
isStatic = false
}
pod("FirebaseCrashlytics")
}
kpgalligan
12/30/2021, 3:06 PMazemar
12/30/2021, 3:07 PMkpgalligan
12/30/2021, 3:07 PMkpgalligan
12/30/2021, 3:09 PMkpgalligan
12/30/2021, 3:09 PMDon't you have to do that for every module though?Not sure I understand what you mean. Every module that wants to include the Kermit-crashlytics?
kpgalligan
12/30/2021, 3:13 PMkpgalligan
12/30/2021, 3:17 PMios()
)
fun org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.iosAll(
namePrefix: String = "ios",
configure: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget.() -> Unit = {}
) {
//...
azemar
12/30/2021, 3:17 PMNot sure I understand what you mean. Every module that wants to include the Kermit-crashlytics?
Multi-module KMM project. Say I have
base
module used by bunch of other KMM modules which includes Kermit-Crashlytics. shared
module is the one being exposed to xcode and has dependency on base
.
Would I need cocoapods linking for Kermit on both base
and shared
modules or just one of them.
Hope that makes my question clearer 😄kpgalligan
12/30/2021, 3:18 PM-framework MySpecialFramework
to linker args for testingkpgalligan
12/30/2021, 3:24 PMkpgalligan
12/30/2021, 3:26 PMkpgalligan
12/30/2021, 3:27 PMazemar
12/30/2021, 3:42 PMdependencies {}
and then cocoapods {}
for KMM dependencies doesn't feel great, reminds me of the times our project used cocoapods and carthage at the same time.kpgalligan
12/30/2021, 4:13 PMkpgalligan
12/30/2021, 4:14 PMkpgalligan
12/30/2021, 4:20 PMHowever gradle also offers dependency managementI guess you could have a different scope in gradle like
cocoapod("AlamoFire")
or spm("whatever")
. That would look more like gradle, although I can't see how it's functionally much different than having the cocoapods block. It's more "gradle-formal", but you'd still need to wire things in on the iOS side. I haven't thought a ton about it, though.azemar
12/30/2021, 4:21 PMIs maven very common for iOS framework dependencies? That seems very, very special case to me.
It's not common, haven't seen maven used for iOS dependencies ever. Just saying KMM dependencies come from maven though, so it shouldn't require other dependency management systems on top for any of the targets.
kpgalligan
12/30/2021, 4:23 PMazemar
12/30/2021, 4:25 PMkpgalligan
12/30/2021, 4:25 PMso it shouldn't require other dependency management systems on top for any of the targetsYeah, I guess that's what I'm saying. That's for sure not going to work, unless there's a wholesale import of ios frameworks into a maven repo somewhere. I would so , technically speaking, gradle dependencies can come from maven, but they can also come from ivy, local files, or custom repos (I believe). You can also write your own dependency management extensions, so rather than expect xcode frameworks somehow would wind up in a maven repo, the only way that would be feasible would be to write gradle dependency support for cocoapods repos (or spm, etc)
kpgalligan
12/30/2021, 4:27 PM