touchlab / KaMPKit

KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
https://touchlab.co/
Apache License 2.0
2.17k stars 196 forks source link

Can't build iOS - minimum deployment target is too low / APIs used require a too high minimum deployment target #302

Closed Mugurell closed 1 year ago

Mugurell commented 1 year ago

Gist of what seems to fix the issues:


Issues seen:

Trying to build the code from current main gives me an error:

..KaMPKit/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'SwiftLint' from project 'Pods')

This is used in two places

 

Going further, as reported in https://github.com/touchlab/KaMPKit/issues/300 there are API usages that require a minimum deployment target of 14.0 image

 

Then we'd get another error when using ./gradlew build:

Task :shared:linkPodReleaseFrameworkIosArm64 FAILED e: Compilation failed: Internal compiler error: no implementation found for FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:kotlinx.coroutines.Job) returnType:kotlinx.coroutines.Job? when building itable for CLASS INTERFACE name:Job modality:ABSTRACT visibility:public superTypes:[kotlin.coroutines.CoroutineContext.Element] implementation in CLASS CLASS name:ChannelJob modality:FINAL visibility:private superTypes:[io.ktor.utils.io.ReaderJob; io.ktor.utils.io.WriterJob; kotlinx.coroutines.Job] at /opt/buildAgent/work/49d4a482a8522285/ktor-io/common/src/io/ktor/utils/io/Coroutines.kt (156:1) CLASS CLASS name:ChannelJob modality:FINAL visibility:private superTypes:[io.ktor.utils.io.ReaderJob; io.ktor.utils.io.WriterJob; kotlinx.coroutines.Job]

  • Source files:
  • Compiler version info: Konan: 1.8.21 / Kotlin: 1.8.21
  • Output kind: FRAMEWORK

which is reported here https://youtrack.jetbrains.com/issue/KTOR-5728 which is fixed in the latest ktor version - 2.3.2.

 

Then finally there is https://github.com/touchlab/KaMPKit/issues/287 which seems like a flaky test that can be improved.

findjigar commented 1 year ago

It should be fixed in main branch now