Hello everyone, I want to add posthog to my kmp pr...
# multiplatform
h
Hello everyone, I want to add posthog to my kmp project using cocoapods, I followed the official instruction, but I get an error which is not meaningful for me. can anyone help?
Copy code
cocoapods {
        version = "1.0"
        summary = "Some description for a Kotlin/Native module"
        homepage = "Link to a Kotlin/Native module homepage"

        name = "MyCocoaPod"

        framework {
            baseName = "MyFramework"

            isStatic = false
            transitiveExport = false // This is default.
        }

        pod("PostHog") {
            version = "~> 3.0.0"
        }

        xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
        xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
and this is the error
Copy code
xecuting of '/usr/local/bin/pod install' failed with code 1 and message: 

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "PostHog":
  In Podfile:
    PostHog (~> 3.0.0)

Specs satisfying the `PostHog (~> 3.0.0)` dependency were found, but they required a higher minimum deployment target.
a
At the moment in your cocoapods section of the build gradle, you dont specify a minimum ios deployment version so it uses a default, it will be that the version is lower than what this library(posthog) supports. The simple solution is to specify one(13.0 is the one in posthog podspec file). So add this line to your cocoapods bit
Copy code
cocoapods {
ios.deploymentTarget = "13.0"
}
it might be that your xcode project also has a lower minimum deployment target, so you should change that in xcode