ttypic / swift-klib-plugin

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

Invalid Manifest (xCode 15) #11

Closed dusiema closed 9 months ago

dusiema commented 9 months ago

I followed the post here to get crypto working in an Kotlin multiplatform app (iOS side) using this plugin.

However, the compilation fails (in xCode) with the error:

> Task :shared:swiftklibKCryptoIosArm64
error: 'swiftbuild': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/l6/dvt5060j6qlb9_cr_551vdpw0000gn/T/TemporaryDirectory.OySw0O/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk", "-package-description-version", "5.5.0", "/Users/dusiema/projects/ti-mobile/shared/build/swiftklib/KCrypto/iosArm64/swiftBuild/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/var/folders/l6/dvt5060j6qlb9_cr_551vdpw0000gn/T/TemporaryDirectory.iiJUpf/swiftbuild-manifest"])
error: fatalError
<unknown>:0: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX'
<unknown>:0: error: unable to load standard library for target 'arm64-apple-macosx13.0'

> Task :shared:swiftklibKCryptoIosArm64 FAILED
error: Process 'command 'xcrun'' finished with non-zero exit value 1

Is this supposed to work with xCode 15 as well? It is actually compiling my KCrypto code. (Gradle builds in Android Studio). But building the app in xCode runs into this problem. Any hints are greatly appreciated. I'd love to get crypto running in my multiplatform app.

twyatt commented 9 months ago

We were previously using Xcode 14.3.1, after upgrading to Xcode 15.0.0 (also upgraded to macOS 13.6) we now see a similar error.