https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

leandro

03/30/2021, 4:11 PM
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

Petter Måhlén

03/31/2021, 6:42 AM
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

sushma nayak

04/01/2021, 4:31 AM
Try
Copy code
ios.deploymentTarget = "8.0"
on cocoapods{..} “” in place ‘’
j

jean

06/10/2021, 1:05 PM
@leandro did you find a way to fix this issue? I’m getting exactly the same thing now
l

leandro

06/10/2021, 2:22 PM
Sadly no, I gave up :/
j

jean

06/11/2021, 7:34 AM
j

joshshin

06/17/2021, 10:13 PM
you were able to import it into ios? i wasn't able to successfully unless i changed the framework from dynamic to static
j

jean

06/18/2021, 6:22 AM
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
23 Views