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

xiaobailong24

09/29/2021, 11:04 AM
https://kotlinlang.org/docs/native-cocoapods.html#add-a-dependency-on-a-pod-library-from-the-cocoapods-repository Hello, I try to add a dependency on pod library(AFNetworking) to KMM shared moudle by CocoaPods integration, but get the below error: fatal error: module 'AFNetworking' not found, how to fix it? Thx!
k

KamilH

09/29/2021, 11:36 AM
I just came here to ask about the same. However in my case I can import
AFNetworking
and use it in an iOS module, but when I’m trying to import
Ably
dependency (some other cocoapods dependency) it doesn’t work. Did you try to import some other cocoapods dependency? Lets say some Facebook or Firebase dependency just to check whether it’s a problem with your configuration or with the dependency?
b

Benoye

09/29/2021, 12:35 PM
Hey, I was able to import
AFNetworking
(to check if it works) but I had the same error for
Plaid
pod I tried to change the
moduleName
in the pod definition (trying
plaid
for example) but unsuccessfully..
k

KamilH

09/29/2021, 12:39 PM
I just checked and I can confirm that I also can’t import
Plaid
dependency. It fails with the same message, so it’s impossible to understand what’s wrong
b

Benoye

09/29/2021, 12:41 PM
Yeah, it's strange.. FYI, I looked at this : https://youtrack.jetbrains.com/issue/KT-43929 I ended up importing the framework manually in XCode..
k

KamilH

09/30/2021, 9:39 AM
Hi @Benoye, I replayed to you in the issue you posted. I found out that Plaid is using different name for their inner module, so to be able to import it you need to use following configuration:
Copy code
pod("Plaid") {
    moduleName = "LinkKit"
}
b

Benoye

10/01/2021, 8:18 AM
Hi @KamilH thank you for looking at the "Plaid" problem ! I thought I tried with LinkKit as well, but maybe I am wrong -> I will definitely try it again ! Hope you can figure it out about your own pod !
k

KamilH

10/01/2021, 8:20 AM
No problem, I hope it’s gonna work for you 🙂 Mine problem is a little bit different, because it turn out that my pod is not a framework but Obj-c library with different file structure, but I still hope I will find a solution