I'm trying to add Stripe via cocoapods to my KMM p...
# multiplatform
p
I'm trying to add Stripe via cocoapods to my KMM project. I've added it via
pod("Stripe")
to my
build.gradle.kts
but now syncing the project fails with the task
':shared:cinteropStripeIosArm64'
producing the following error:
Copy code
Exception in thread "main" java.lang.Error: /Users/paulweber/Development/Spenderino/shared/build/cocoapods/synthetic/IOS/shared/build/Release-iphoneos/Stripe/Stripe.framework/Headers/Stripe-Swift.h:722:10: error: no type or protocol named 'PKContactField'
    at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:192)
I can use Stripe inside Xcode with this configuration, but building my shared kotlin module fails due to the aforementioned task failing. I'm guessing this has something to do with the gradle task not having access to Apple's
PassKit
which is however needed for compiling the Stripe pod? Has someone successfully integrated Stripe in a KMM project or run into a similar error with cocoapods?
This seems to be related to https://youtrack.jetbrains.com/issue/KT-49148 As in, stripe's objc header is using
@import
which cinterop doesn't support.