URLQueryEncoder icon indicating copy to clipboard operation
URLQueryEncoder copied to clipboard

This library has a problem using xcframeworks

Open wweevv-johndpope opened this issue 1 year ago • 1 comments

background https://github.com/unsignedapps/swift-create-xcframework/issues/80

https://github.com/apple/swift/issues/56573

warning: public struct 'AnyCodable.AnyCodable' shadows module 'AnyCodable', which may cause failures when importing 'AnyCodable' or its clients in some configurations; please rename either the struct 'AnyCodable.AnyCodable' or the module 'AnyCodable', or see https://bugs.swift.org/browse/SR-14195 for workarounds @Frozen public struct AnyCodable: Codable {

to verify

brew install mint mint install unsignedapps/swift-create-xcframework swift create-xcframework URLQueryEncoder should see above error.

Seems like either the class or module has to be renamed.


// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "URLQueryEncoderKit",
    platforms: [
        .macOS(.v10_13),
        .iOS(.v11),
        .tvOS(.v11),
        .watchOS(.v4)
    ],
    products: [
        .library(
            name: "URLQueryEncoderKit",
            targets: ["URLQueryEncoderKit"]),
    ],
    targets: [
        .target(
            name: "URLQueryEncoderKit",
            dependencies: []),
        .testTarget(
            name: "URLQueryEncoderTests",
            dependencies: ["URLQueryEncoderKit"]),
    ]
)


rename sources/URLQueryEncoder -> sources/URLQueryEncoderKit

working branch


// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
  name: "GoTrue",
  platforms: [
    .iOS(.v13),
    .macCatalyst(.v13),
    .macOS(.v10_15),
    .watchOS(.v6),
    .tvOS(.v13),
  ],
  products: [
    .library(name: "GoTrue", targets: ["GoTrue"])
  ],
  dependencies: [
    .package(url: "https://github.com/WeTransfer/Mocker", from: "2.7.0"),
    .package(url: "https://github.com/binaryscraping/swift-composable-keychain", from: "0.0.2"),
    .package(url: "https://github.com/kean/Get", from: "2.0.0"),
    .package(url: "https://github.com/wweevv-johndpope/URLQueryEncoderKit", from: "0.2.2"),
  ],
  targets: [
    .target(
      name: "GoTrue",
      dependencies: [
        .product(name: "Get", package: "Get"),
        .product(name: "ComposableKeychain", package: "swift-composable-keychain"),
        .product(name: "URLQueryEncoderKit", package: "URLQueryEncoderKit"),
      ]
    ),
    .testTarget(
      name: "GoTrueTests",
      dependencies: [
        "GoTrue",
        "Mocker",
      ],
      resources: [
        .process("Resources")
      ]
    ),
  ]
)


wweevv-johndpope avatar Sep 05 '22 00:09 wweevv-johndpope