CreateAPI / CreateAPI/URLQueryEncoder

This library has a problem using xcframeworks

Đang mở
#4 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Swift
Star
46
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

// 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

// 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")
]
),
]
)

```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.