ttypic / swift-klib-plugin

Gradle Plugin for injecting Swift code into Kotlin Multiplatform Mobile shared module
MIT License
193 stars 9 forks source link

fix: use platformVersion instead of min*Version linker flag for xcode 15 #19

Closed kalinjul closed 10 months ago

kalinjul commented 10 months ago

Xcode 15 introduced a new linker that appearently removes the ios_version_min etc. flags and replaces it with -platform_version

From manpage:

-platform_version platform min_version sdk_version
             This is set to indicate the platform, oldest supported version of that platform that output is to be used on, and the SDK that the output was built against.  platform is a
             numeric value as defined in <mach-o/loader.h>, or it may be one of the following strings:
             • macos
             • ios
             • tvos
             • watchos
             • bridgeos
             • visionos
             • xros
             • mac-catalyst
             • ios-simulator
             • tvos-simulator
             • watchos-simulator
             • visionos-simulator
             • xros-simulator
             • driverkit
             Specifying a newer min or SDK version enables the linker to assume features of that OS or SDK in the output file. The format of min_version and sdk_version is a version number
             such as 10.13 or 10.14

This commit fixes builds with XCode 15.