From f8631412af0bc659d2b0612379c6901bdeb4c2ce Mon Sep 17 00:00:00 2001 From: jaroshevskii Date: Sat, 2 Mar 2024 20:07:57 +0200 Subject: [PATCH] Corrected the instruction for adding a library via SwiftPM --- README.ja.md | 21 ++++++++++++++------- README.md | 21 ++++++++++++++------- README.uk.md | 21 ++++++++++++++------- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/README.ja.md b/README.ja.md index 4c63d86..9855861 100644 --- a/README.ja.md +++ b/README.ja.md @@ -76,13 +76,20 @@ Xcode に Swift Packages を追加する詳細については、[Hacking with Sw 1. 依存関係として IceCreamSandwich を Package.swift ファイルに追加します: - ```swift - dependencies: [ - .package(url: "https://github.com/jaroshevskii/ice-cream-snadwich.git", from: "1.0.0"), - ], - targets: [ - .target(name: "YourTarget", dependencies: ["IceCreamSandwich"]), - ] + ```swift + let package = Package( + // name, platforms, products, など + dependencies: [ + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"), + ], + targets: [ + .target( + name: "YourTargetName", + dependencies: [ + .product(name: "IceCreamSandwich", package: "swift-ice-cream-sandwich"), + ]), + ] + ) ``` 2. `swift build` を実行してパッケージを取得し、プロジェクトに統合する。 diff --git a/README.md b/README.md index bee51eb..25f6813 100644 --- a/README.md +++ b/README.md @@ -72,14 +72,21 @@ For more information on adding Swift Packages to Xcode, you can read the [Hackin ### Swift Package Manager 1. Add IceCreamSandwich to your Package.swift file as a dependency: - + ```swift - dependencies: [ - .package(url: "https://github.com/jaroshevskii/ice-cream-snadwich.git", from: "1.0.0"), - ], - targets: [ - .target(name: "YourTarget", dependencies: ["IceCreamSandwich"]), - ] + let package = Package( + // name, platforms, products, etc. + dependencies: [ + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"), + ], + targets: [ + .target( + name: "YourTargetName", + dependencies: [ + .product(name: "IceCreamSandwich", package: "swift-ice-cream-sandwich"), + ]), + ] + ) ``` 2. Run `swift build` to fetch and integrate the package into your project. diff --git a/README.uk.md b/README.uk.md index d790537..43c4247 100644 --- a/README.uk.md +++ b/README.uk.md @@ -74,12 +74,19 @@ if integerSandwich.isIceCreamSandwich { 1. Додайте IceCreamSandwich до файлу Package.swift як залежність: ```swift - dependencies: [ - .package(url: "https://github.com/jaroshevskii/ice-cream-snadwich.git", from: "1.0.0"), - ], - targets: [ - .target(name: "YourTarget", dependencies: ["IceCreamSandwich"]), - ] + let package = Package( + // name, platforms, products і т.д. + dependencies: [ + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"), + ], + targets: [ + .target( + name: "YourTargetName", + dependencies: [ + .product(name: "IceCreamSandwich", package: "swift-ice-cream-sandwich"), + ]), + ] + ) ``` 2. Запустіть `swift build`, щоб отримати та інтегрувати пакунок у ваш проект. @@ -90,4 +97,4 @@ if integerSandwich.isIceCreamSandwich { ## Ліцензія -Випускається на умовах ліцензії [MIT](LICENSE.txt). +Випускається на умовах [MIT license](LICENSE.txt).