eduayuso / kmm-mvi-compose-swiftui

Kotlin Multiplatform app with MVI architecture, Jetpack Compose and SwiftUI
22 stars 2 forks source link

I am having constant error while compiling project in xcode 15.0 #4

Open chetandobariya opened 11 months ago

chetandobariya commented 11 months ago

I am having error while compiling project in xcode 15.0

Please have a look below error.

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1. output: -iphoneos_version_min has been renamed to -ios_version_min ld: unknown options: -sdk_version

can you please help to fixed that

chetandobariya commented 11 months ago

Task :shared:linkDebugFrameworkIosArm64 FAILED e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1. output: -iphoneos_version_min has been renamed to -ios_version_min ld: unknown options: -sdk_version

chetandobariya commented 11 months ago

ok here is the fixed

  1. change below versions to latest.

    
    object Versions {
    
    object Plugins {
    
        const val kotlin    = "1.9.10"
        const val android   = "8.1.0"
    }

2. update shared/build.gradle.kts 

listOf( iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { it.binaries.framework { baseName = "shared" } }

and remove 

ios { binaries { framework("shared") { } }


and finally 
3. change import target in xcode in all files 
from import `Shared` to import `shared`
eduayuso commented 11 months ago

I will apply the fix as you have pointed. However you are free to collaborate in this project by making pull requests. Thank you!