Skip to content

A starter template for Swift Package Manager projects.

License

Notifications You must be signed in to change notification settings

CypherPoet/swift-package-template

Repository files navigation

MyLibraryName

Swift Version Compatibility

Swift Platform Compatibility

Twitter: @cypher_poet

[ A brief synopsis of this library ].

Installation

Xcode Projects

Select File -> Swift Packages -> Add Package Dependency and enter https://github.com/CypherPoet/MyLibraryName.

Swift Package Manager Projects

You can add MyPackageName as a package dependency in your Package.swift file:

let package = Package(
    //...
    dependencies: [
        .package(
            url: "https://github.com/CypherPoet/MyLibraryName",
            exact: "0.0.1"
        ),
    ],
    //...
)

From there, refer to the MyLibraryName "product" delivered by the MyPackageName "package" inside of any of your project's target dependencies:

targets: [
    .target(
        name: "YourLibrary",
        dependencies: [
            .product(
                name: "MyLibraryName",
                package: "MyPackageName"
            ),
        ],
        ...
    ),
    ...
]

Then simply import MyLibraryName wherever you’d like to use it.

Usage

🗺 Roadmap

  • World Domination

💻 Developing

Requirements

  • Xcode 14.0+

✍️ Building The Documentation

Documentation is built with DocC (see Apple's guidance for more details about creating DocC content).

To build and preview the documentation output, follow the instructions for the here for the Swift-DocC Plugin.

If you're using VSCode, there's also a task configuration that will handle this directly from the editor 💪

🏷 License

MyPackageName is available under the MIT license. See the LICENSE file for more info.

Steps For Using This Template

  • Rename instances of MyLibraryName to the library's product name.
  • Rename files and directories with names of MyLibraryName to the library's product name.
  • Rename instances of MyPackageName to the library's Swift package name.
  • Update supported platforms in Package.swift and in this README's badges as appropriate.
  • Replaces instances of [ A brief synopsis of this library ] with the library's short description.
  • Delete this section.