I’m getting an error trying to use cocoapods depen...
# multiplatform
l
I’m getting an error trying to use cocoapods dependency on my
iosMain
. the config of Cocoapods is:
Copy code
cocoapods {
    summary = "..."
    homepage = "..."

    frameworkName = "test"

    ios.deploymentTarget = '8.0'

    pod('Analytics') { version = '~> 4.1.2' }
    pod('Segment-Amplitude') { version = '~> 3.2.3' }
    pod('segment-appsflyer-ios') { version = '6.1.4' }
    podfile = project.file("src/iosMain/Podfile")
  }
with Podfile being
Copy code
use_frameworks!

platform :ios, '8.0'

target 'ios-app' do
        pod 'kotlin_library', :path => '../kotlin-library'
end
The error is on the thread 🧵
Copy code
Automatically assigning platform `iOS` with version `8.0` on target `App-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `<https://guides.cocoapods.org/syntax/podfile.html#platform>`.

Tip: try to configure deployment_target for ALL targets as follows:
cocoapods {
   ...
   ios.deploymentTarget = "..."
   ...
}
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AdvancedCocoapodsTasksKt.runCommand(AdvancedCocoapodsTasks.kt:342)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AdvancedCocoapodsTasksKt.runCommand$default(AdvancedCocoapodsTasks.kt:303)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.PodGenTask.generate(AdvancedCocoapodsTasks.kt:424)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
p
i don’t know cocoapods, but i get the feeling you might either have syntax error in the podfile, or you might not be loading the one you specified. maybe the latter is more likely. you could try to change how you configure the podfile and see if that makes a difference
s
Try
Copy code
ios.deploymentTarget = "8.0"
on cocoapods{..} “” in place ‘’
j
@leandro did you find a way to fix this issue? I’m getting exactly the same thing now
l
Sadly no, I gave up :/
j
j
you were able to import it into ios? i wasn't able to successfully unless i changed the framework from dynamic to static
j
If you mean in the iios dedicated package of my KMM module (under iosMain) yes. If you mean in the app itself, I haven’t try yet