Cristina Suciu

    Cristina Suciu

    2 weeks ago
    hi, I'm experimenting with referencing a KMM framework from within an iOS framework, I'm running
    ./gradlew :shared:embedAndSignAppleFrameworkForXcode
    script at pre-compile time on the framework's project file and I'm getting this runtime error:dyld[87584]: Library not loaded: @rpath/shared.framework/shared I'm following this documentation https://kotlinlang.org/docs/multiplatform-mobile-integrate-in-existing-app.html#connect-the-framework-to-your-ios-project does anyone know what other build settings I'm missing here?
    @kpgalligan
    s

    Sebastian Muggelberg

    2 weeks ago
    A couple of things could be wrong: • maybe the search path in the build settings in your Xcode project is not correct • maybe you are using a dynamic framework and the file can not be found after the project has been build. You would need to write a script to copy the binary manually to the correct place then Try to make the framework static in your build.gradle file. This could solve it.
    kpgalligan

    kpgalligan

    2 weeks ago
    Not sure. We pretty much never use the embed task. Just Cocoapods/SPM
    Konstantin Tskhovrebov

    Konstantin Tskhovrebov

    2 weeks ago
    @Cristina Suciu could you explain what you want to build? and show your build config the error says: your dynamic framework wasn’t found in
    rpath
    which usually points inside app bundle. the embed task copies framework to an app dir during a xcode build
    Cristina Suciu

    Cristina Suciu

    2 weeks ago
    @Konstantin Tskhovrebov I have a custom iOS framework that is running the
    embedAndSignAppleFrameworkForXcode
    at pre-compile time. I can create a sample project and I'll share it with you
    Konstantin Tskhovrebov

    Konstantin Tskhovrebov

    2 weeks ago
    kotlin framework is dynamic then you have to embed it together with your iOS framework to result app
    Cristina Suciu

    Cristina Suciu

    1 week ago
    @Konstantin Tskhovrebov how do I embedded it? I've used xcodegen to add the kmm framework as a dependency, but it fails at compile time. The custom script executing
    embedAndSignAppleFrameworkForXcode
    is ran later in the build process.
    @kpgalligan <<Just Cocoapods/SPM>> do you just run the script to generate the KMM framework from terminal? Or do you integrate it in some other build process?
    kpgalligan

    kpgalligan

    1 week ago
    The default Cocoapods setup lets you build from Xcode and it handles the gradle calls to properly wrap things. The Android Studio template has a Cocoapods option (IIRC), or you can look at our basic sample: https://github.com/touchlab/KaMPKit