I have a KMP project with two separate shared modu...
# multiplatform
c
I have a KMP project with two separate shared modules. One is for shared code that is used on my two mobile targets (iOS and Android) - repositories, apis, etc. The other module is for shared models that are used by any client and my server - DTOs, forms, requests, etc.. I find that classes from my
shared
module can be imported in swift code with no issue. However, class from my second
client.shared
module are imported in swift with an additional
Client_shared
prefix added to every class name. For example,
com.xyz.client.shared.ApplicationUser
becomes
Client_sharedApplicationUser
. Is there a way to configure or setup my project so that I don't get this prefix?
d
I ran into the same recently. Have you tried export?
👍 1
c
Thanks @Daniel Seither - that sorted it 👍 Im using cocoapods, so just included it in the framework config
Copy code
cocoapods {
        summary = "Some description for the Shared Module"
        homepage = "Link to the Shared Module homepage"
        version = "1.0"
        ios.deploymentTarget = "14.1"
        podfile = project.file("../iosApp/Podfile")
        framework {
            baseName = "shared"
            export(project(":client-shared"))
        }
    }
🚀 1