multiplatform-swiftpackage
multiplatform-swiftpackage copied to clipboard
While building for Mac Catalyst, no library for this platform was found
Hi, I'm using this framework to generate xcframework for ios/macos. Work on ios, but for mac I receive an error in Xcode:
While building for Mac Catalyst, no library for this platform was found in '.../shared/swiftpackage/KMMProject.xcframework'.
Configuration:
multiplatformSwiftPackage {
packageName("KMMProject")
swiftToolsVersion("5.3")
targetPlatforms {
iOS { v("13") }
targets("macosX64") { v("10.0") }
}
}
val packForXcode by tasks.creating(Sync::class) {
group = "build"
val targetDir = File(buildDir, "xcode-frameworks")
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm64" else "X64"
val frameworkIos = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(frameworkIos.linkTask)
from({ frameworkIos.outputDirectory })
into(targetDir)
val frameworkMac = kotlin.targets.getByName<KotlinNativeTarget>("macOS").binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(frameworkMac.linkTask)
from({ frameworkMac.outputDirectory })
into(targetDir)
}
Is there any fix for that?
bump! just wondering if there are any updates on this issue? I'm seeing the same results.
I've faced the same issue, wanted to be able to run the unit tests in Xcode for this target.
I've faced the same issue, wanted to be able to run the unit tests in Xcode for this target. @kyzmitch @imfractured
Did you find a fix for the problem? I tried to run archive with xcode and tried to run it in the CI pipeline but keep getting the same error.
I've faced the same issue, wanted to be able to run the unit tests in Xcode for this target. @kyzmitch @imfractured
Did you find a fix for the problem? I tried to run archive with xcode and tried to run it in the CI pipeline but keep getting the same error.
I was able to upload the app to iTunesConnect using SwiftPackage produced by this tool or maybe XCFrameworks produced by it. For the unit tests I just used iOS simulator target for running and disabled Mac Catalyst completely for now.