Hello everyone, I'm very new to Kotlin native and ...
# kotlin-native
t
Hello everyone, I'm very new to Kotlin native and I know almost nothing about iOS-development. I'm trying refactor an existing IOS-app which uses pods. I use JWTDecode as POD dependency. The idea autocompletion etc. works. When I build the code for an emulator, it fails on JWTDecodeIos. The error I get is:
(1,9) Module JWTDecode not found.
The project has objc-attributes added: https://github.com/auth0/JWTDecode.swift/pull/55 The top-level pod uses:
use_frameworks!
(It also has the JWTDecode-dependency...) I do have:
Copy code
// Revert to just ios() when gradle plugin can properly resolve it
val onPhone = System.getenv("SDK_NAME")?.startsWith("iphoneos") ?: false
if (onPhone) {
    iosArm64("ios")
} else {
    iosX64("ios")
}
which maybe explains the difference? But removing the if and trying first one and then the other also didn't seem to work. Can anyone help me?
g
Did you open the workspace or the project in AppCode?
t
I believe I opened on the project, but it told me I could use the workspace, so I did. It build for me before, but it stopped working after adding a pod-dependency, if that help to answer your question?
g
Ok. When using Cocoapods you always need to open the workspace. Otherwise AppCode and Xcode can’t resolve the dependencies. When you add a new pod you need to execute
pod install
to generate the workspace with the new pod.
👍🏻 1
t
Thanks, it works!!!
👍 1