Create XCFramework for arm simulator
Hi guys, your plugin is awesome! But I stuck with one problem. Here is my configuration :
multiplatformSwiftPackage {
packageName("XXX")
swiftToolsVersion("5.3")
targetPlatforms {
iOS { v("13") }
}
}
createSwiftPackage task generates Swift package with two targets ios-arm64 and ios-x86_64-simulator, this works great on Intel Mac simulators and iPhones, but this not works on Apple silicone arm simulator.
So is it possible to generate target for Arm simulator ?
Having the same issue, but it's not related to this plugin. Apple Silicon support is on the Kotlin Roadmap. For details, see these tickets: KT-43667 and KT-45302
Seems like Kotlin supports Apple Silicon beginning with version 1.5.30: https://blog.jetbrains.com/kotlin/2021/07/kotlin-1-5-30-m1-released/
Can anyone confirm if it works? 😃
@bogdan-razvan Not works. As I understand kotlin team added a new targets macosArm64, iosSimulatorArm64, watchosSimulatorArm64, tvosSimulatorArm64 so need to add it into the plugin. @ge-org Do you have any near plans for support it? Or you will wait pull requests from community?
Anyway I submitted new pull request with new targets support.
Is this planned to be merged ? I need to run on arm simulator.
I'm looking for the same. Any chance PR to be merged in order to support M1 chip? @ge-org, thank you!
Heyo, also waiting on this merge, thanks @jizoquval!
I'm also very interested in this. Do you think it will happen or is it time to look for alternatives?
Hey guys, did anyone find a solution for this without this plugin?
There is a workaround for me. In build.gradle.kts plugins { ... id("org.jetbrains.kotlin.native.cocoapods") version "1.7.10" ... } ... kotlin { // HERE IS THE KEY PART. You can add whatever platform you want to package in the xcframework. iosX64() iosArm64() iosSimulatorArm64() ... cocoapods { summary = "..." homepage = "https://gitlab.com/...." version = "x.x.x" ios.deploymentTarget = "15" framework { baseName = "awesome name" } } ... }
Yeah just that cocoapods plugin. If you already know how to use it. That's awesome.
Once the plugin is set up right. Run gradle command in cocoapods/podPublishDebugXCFramework. You can also choose the release one.
You'll get the framework at project_folder/build/cocoapods/publish/debug/awesome_name.xcframework
Replace awesome_name.xcframework in the folder where multiplatform-swift-package created.
Make sure the names created by both are the same. Otherwise just change the name in Package.swift will also be ok.