Hello everyone, I generated a framework using Coco...
# ios
g
Hello everyone, I generated a framework using Cocoapods, the build.gradle block is below. My app supports iOS 14.1 and later, it's a native iOS app and is only using one feature in KMP, but when I open the app on an iPhone with iOS 15.0 to iOS 15.3, the app is crashing. The log message is:
Copy code
dyld[56606]: Symbol not found: __ZNSt3__117bad_function_callD1Ev
Referenced from: /Users/silvatf1/Library/Developer/CoreSimulator/Devices/E3823A73-6312-44D2-BB5E-8423F234210E/data/Containers/Bundle/Application/873EB1C5-B653-46DF-B9EF-12487CD9203F/Digital-UAT.app/Frameworks/DigitalKMP.framework/DigitalKMP
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++.1.dylib
From what I've researched, this error is caused by the C++ code generated, it's generating a symbol that doesn't exist in these older versions of iOS. Has anyone else had a similar problem?
Copy code
cocoapods {
        version = libVersion
        summary = "Some description for a Kotlin/Native module"
        homepage = "Link to a Kotlin/Native module homepage"
        ios.deploymentTarget = "14.1"
        name = frameworkName

        podfile = project.file("../iosApp/Podfile")

        publishDir = rootProject.file("./")

        framework {
            baseName = frameworkName
            homepage = repositoryUrl
            isStatic = false

            source = "{ :git => '${repositoryUrl}.git', :tag => spec.version.to_s }"

            binaryOptions["bundleId"] = bundleId
            binaryOptions["bundleVersion"] = libVersion

            freeCompilerArgs += listOf(
                "-Xexport-kdoc",
                "-Xexpect-actual-classes",
                "-Xoverride-konan-properties=osVersionMin.ios_arm64=14.1",
                "-Xoverride-konan-properties=osVersionMin.ios_x64=14.1",
                "-Xoverride-konan-properties=osVersionMin.ios_simulator_arm64=14.1"
            )

            export(project(":networking-kmp"))
            export(project(":suitability-kmp"))
        }
    }
it’s related to the kotlin version
😮 1
g
Thank you so much @François