KMMBridge icon indicating copy to clipboard operation
KMMBridge copied to clipboard

Add possibility to specify swift tools version and target version

Open TemMax opened this issue 1 year ago • 1 comments

Summary

  1. Swift tools version config
  2. Target platforms config

Details

Hi! Thanks for the great and helpful plugin. I made PR with the possibility of specifying the Swift tools and target versions (currently, only for iOS). If you know how to add support for all targets, I'd appreciate the help because I haven't had any luck figuring it out all the way through. My code was inspired by the multiplatform-swiftpackage library.

Result

Here is the result of the changes:

// swift-tools-version:5.8
import PackageDescription

let packageName = "BeautifulSDK"

let package = Package(
    name: packageName,
    platforms: [
        .iOS(.v14)
    ],
    products: [
        .library(
            name: packageName,
            targets: [packageName]
        ),
    ],
    targets: [
        .binaryTarget(
            name: packageName,
            path: "./sdk/build/XCFrameworks/debug/\(packageName).xcframework"
        )
        ,
    ]
)

TemMax avatar Jul 26 '23 22:07 TemMax

@russhwolf could you review it, please? :)

TemMax avatar Aug 09 '23 07:08 TemMax