{"id":17046192,"url":"https://github.com/ladislas/swiftpm-package-template","last_synced_at":"2026-05-07T07:32:12.486Z","repository":{"id":68360469,"uuid":"153285808","full_name":"ladislas/SwiftPM-Package-Template","owner":"ladislas","description":"SwiftPM Package Template with everything you need and more!","archived":false,"fork":false,"pushed_at":"2018-10-17T10:21:03.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T08:55:42.667Z","etag":null,"topics":["cocoapods","git-flow","ice","library","package","sonarcloud","spm","swift","swift-package-manager","swiftpm","template","travis-ci","xcode"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ladislas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-16T12:59:09.000Z","updated_at":"2024-03-07T15:28:46.000Z","dependencies_parsed_at":"2023-04-13T14:31:51.416Z","dependency_job_id":null,"html_url":"https://github.com/ladislas/SwiftPM-Package-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladislas%2FSwiftPM-Package-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladislas%2FSwiftPM-Package-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladislas%2FSwiftPM-Package-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladislas%2FSwiftPM-Package-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ladislas","download_url":"https://codeload.github.com/ladislas/SwiftPM-Package-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245048798,"owners_count":20552569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","git-flow","ice","library","package","sonarcloud","spm","swift","swift-package-manager","swiftpm","template","travis-ci","xcode"],"created_at":"2024-10-14T09:45:34.183Z","updated_at":"2026-05-07T07:32:07.453Z","avatar_url":"https://github.com/ladislas.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftPM Package Template\n\n\u003c!--{change_me}--\u003e\n[![swift-version](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)](swift.org)\n[![spm](https://img.shields.io/badge/spm-v1.0.0-blue.svg)](https://github.com/apple/swift-package-manager)\n[![CocoaPods](https://img.shields.io/cocoapods/v/SwiftEventCenter.svg)](https://cocoapods.org/pods/SwiftEventCenter)\n[![Build Status](https://travis-ci.org/ladislas/SwiftEventCenter.svg)](https://travis-ci.org/ladislas/SwiftEventCenter)\n[![SonarCloud](https://sonarcloud.io/api/project_badges/measure?project=ladislas_SwiftEventCenter\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=ladislas_SwiftEventCenter)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ladislas_SwiftEventCenter\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=ladislas_SwiftEventCenter)\n[![SwiftEventCenter](https://img.shields.io/badge/license-Apache--2.0-lightgrey.svg)](https://github.com/ladislas/SwiftEventCenter/blob/master/LICENSE)\n\n\u003c!--{REMOVE EVERYTHING BETWEEN THIS TAG}--\u003e\n\n## About SwiftPM Package Template\n\n**Note:** *Remove this section before publishing your package.*\n\nThis repository contains a template directory structure for SPM Library Packages.\n\n### How to use\n\n1. Clone this repository\n\n\t```bash\n\tgit clone https://github.com/ladislas/SwiftPM-Package-Template path/to/PackageName\n\t```\n\n2. `cd` to the cloned repository\n\n\t```bash\n\tcd path/to/PackageName\n\t```\n\n3. Delete `.git`\n\n\t```bash\n\trm -rf .git\n\t```\n\t\n4. Generate your own package with `swift` or [`ice`](https://github.com/jakeheis/Ice)\n\n\t```bash\n\tswift package init\n\t# or\n\tice init\n\t```\n\t\n5. Reinit `git` and [`git flow`](https://github.com/petervanderdoes/gitflow-avh)\n\n\t```bash\n\tgit init\n\t# and optionally\n\tgit flow init\n\t```\n\n6. Create your repo on Github and add remote\n\n\t```bash\n\tgit remote add origin https://github.com/{user_name}/MyPackage\n\t```\n\nYou're now set up to start developing! 🎉\n\n### What to change - `{change_me}`\n\nThis README.md provides you with a the basic information that should present your package's README.md.\n\n#### \n\nI've added comments and marks using `{change_me}`. Running the following command in your terminal will help you locate \u0026 change them:\n\n```bash\nag \"{change_me}\"\n# or\nack \"{change_me}\"\n# or\ngrep -rnw '.' -e '{change_me}'\n```\n\n### Examples\n\nThe `Examples` folder is here if you want to provide examples showing how to use your library. Even though documentation and test suites can be helpful resources, it's always a good thing to showcase your library in a \"real life\" example.\n\nIf you want to create an example, just do the following:\n\n```bash\n# cd to Examples\ncd Examples\n\n# create example directory \u0026 cd into it\nmkdir MyFirstExample \u0026\u0026 cd $_\n\n# init example\nice init -e\n# or \nswift package init --type executable\n\n# I usually remove the test folder to only keep sources\nrm -rf ./Tests\n```\n\nThen, for your example to use your library from the local sources and not from a remote repository, add this to your `Package.swift` (change the `PackageName`):\n\n```swift\ndependencies: [\n    .package(path: \"../../../PackageName\")\n],\n```\n\nWith this, you can write your examples as your write your library. I really like to be able to immediately use the code. It helps me get a better feeling and can also help with refactoring.\n\n### Documentation\n\nThe `docs` folder is used for documentation. If you use [Jazzy](https://github.com/realm/jazzy), you can just run `jazzy` at the root of the project and it will put all documentation to `docs`.\n\nYou can then publish it directly on Github. Here are the [instructions](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch).\n\n### Travis CI \u0026 SonarCloud\n\nIf you need continuous integration and code coverage, we got you covered! \n\nI personally use Travis CI and [SonarCloud](https://sonarcloud.io/). The latter provides you with code coverage and static analysis. And it's super easy to make it works.\n\nTo simplify the process \u0026 scripting, we are using [IBM's Package-Builder](https://github.com/IBM-Swift/Package-Builder) and providing you with a `.travis.yml` file and a `sonar-project.properties` file.\n\nSteps are:\n\n1. Activate repo on Travis CI\n2. Create new project on SonarCloud and generate token\n3. Add token to Tracis CI as `SONAR_LOGIN_TOKEN`\n4. Enjoy\n\nDetailed instructions on how to use both are available here: \n\n\u003e [Package-Builder SonarCloud Instructions](https://github.com/IBM-Swift/Package-Builder#sonarcloud)\n\n### Cocoapods\n\nWe've also added a `MyProject.podspec` file if you want to publish your library to Cocoapods.\n\nCheck [Podspec Syntax Reference](https://guides.cocoapods.org/syntax/podspec.html) and [Marking a CocoaPod](https://guides.cocoapods.org/making/making-a-cocoapod.html) for more information.\n\n### License\n\nThis project is under Apache 2.0, but feel free to change the License of your own project. \n\n### Badges\n\nA lot of badges are present at the top of the README.md. Feel free to keep them or remove them.\n\nIf you keep them, you need to change the link they point to with your owns.\n\n---\n\n\u003c!--{AND THIS TAG - REMOVE EVERYTHING}--\u003e\n\n## About\n\n\u003e Describe what your project does. \u003c!--{change_me}--\u003e\n\n### Features\n\n\u003e Describe the main features. \u003c!--{change_me}--\u003e\n\n- [x] - it does this\n- [x] - and also this\n- [ ] - but not that\n\n## Installation\n\n### Swift Package Manager \n\nWith SPM, add the following to the dependencies of your `Package.swift`\n\n```swift\n.package(url: \"https://github.com/{change_me}/{change_me}}\", from: \"1.0.0\")\n```\n\n### Cocoapods \u003c!--{change_me}--\u003e\n\nYou want to add pod 'MyPackage', '~\u003e 1.0' similar to the following to your Podfile:\n\n```ruby\ntarget 'MyApp' do\n  pod 'MyPackage', '~\u003e 1.0' \nend\n```\n\nThen run a `pod install` inside your terminal.\n\n### Manually\n\nJust copy the [Sources](./Sources) files into your project.\n\n## Usage\n\n\u003e Describe a simple usage \u003c!--{change_me}--\u003e\n\nSee [docs](./docs), [Examples](./Examples) \u0026 [Tests](./Tests) for more information.\n\n```swift\nimport MyPackage\n\nlet myObj = MyClass()\n...\n```\n\n## Authors\n\nMade with ❤️ by:\n\n- **{change_me}** - [ladislas](https://github.com/ladislas)\n\n## Contributing \n\n\u003e Explain how people can contribute to your project \u003c!--{change_me}--\u003e\n\nWe welcome contributions, and request you follow these guidelines.\n\nPlease raise any bug reports on the issue tracker. Be sure to search the list to see if your issue has already been raised.\n\nA good bug report is one that make it easy for us to understand what you were trying to do and what went wrong. Provide as much context as possible so we can try to recreate the issue.\n\n## License\n\nApache 2.0 @ Ladislas de Toldi \u003c!--{change_me}--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladislas%2Fswiftpm-package-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladislas%2Fswiftpm-package-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladislas%2Fswiftpm-package-template/lists"}