Jeonhui {ios}

SPM(Swift Package Manager) 배포 본문

ios/library

SPM(Swift Package Manager) 배포

jeonhui 2023. 8. 17. 14:38

1. swift package 생성

swift package init

swift package init 이후 다음과 같이 폴더가 생성된 것을 확인할 수 있습니다.

 

2. Package.swift 파일 수정

Package.swift 파일을 클릭하면 다음과 같은 화면이 켜지게 됩니다.

Package parameter

name String The name of the Swift package.
defaultLocalization LanguageTag? The default localization for resources.
(LanguageTag: A wrapper around an IETF language tag.)
platforms [SupportedPlatform]? The list of minimum versions for platforms supported by the package.
(SupportedPlatform: A platform that the Swift package supports.
Platform: A platform supported by Swift Package Manager.)
pkgConfig String? The name to use for C modules.
providers [SystemPackageProvider]? An array of providers for a system target.
(SystemPackageProvider: The system package providers that this package uses.)
products [Product] The list of products that this package vends and that clients can use.
(Product: The object that defines a package product.)
dependencies [Package.Dependency] The list of package dependencies.
(Dependency: A package dependency of a Swift package.)
target [Target] The list of targets that are part of this package.
(Target: The basic building block of a Swift package.)
swiftLanguageVersions [SwiftVersion]? The list of Swift versions with which this package is compatible.
(SwiftVersion: The version of the Swift language you use to compile Swift sources in the package.)
cLanguageStandard CLanguageStandard? The C language standard to use for all C targets in this package.
(CLanguageStandard: The supported C language standard you use to compile C sources in the package.)
cxxLanguageStandard CXXLanguageStandard? The C++ language standard to use for all C++ targets in this package.
(CXXLanguageStandard: The supported C++ language standard you use to compile C++ sources in the package.)

 

https://developer.apple.com/documentation/packagedescription/package