Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fulldecent/swift6-module-template
An opinionated starting point for awesome, reusable Swift 6 modules
https://github.com/fulldecent/swift6-module-template
cocoapods ios swift swift-package-manager template xcode
Last synced: 2 days ago
JSON representation
An opinionated starting point for awesome, reusable Swift 6 modules
- Host: GitHub
- URL: https://github.com/fulldecent/swift6-module-template
- Owner: fulldecent
- License: mit
- Created: 2016-09-13T03:17:48.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T05:13:16.000Z (18 days ago)
- Last Synced: 2025-01-12T02:12:53.138Z (9 days ago)
- Topics: cocoapods, ios, swift, swift-package-manager, template, xcode
- Language: Swift
- Homepage:
- Size: 348 KB
- Stars: 461
- Watchers: 14
- Forks: 58
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-swift - Swift Module Template - An opinionated starting point for awesome, reusable modules. (Boilerplates / Third party Guides)
- fucking-awesome-swift - Swift Module Template - An opinionated starting point for awesome, reusable modules. (Boilerplates / Third party Guides)
README
# Swift 6 Module Template
Use this template as a starting point for any Swift 6 module that you want other people to include in their projects.
**STATUS: This template is ready and works in production code, compatible with Xcode Version 16.0 (16A242d)**
![Swift 5 Module directory layout](https://github.com/fulldecent/swift5-module-template/assets/382183/1a7965f0-af84-4d00-9bb6-97db76e6e715)
## Features
Your new Swift module will immediately have working, compilable code, and implement these best practices:
- Ability to be used from Swift Package Manager
- Clean folder structure
- MIT license
- Testing as a standard
- Turnkey access to GitHub Actions testing
- Semantic versioning and a CHANGELOG
- Included example/demo app using SwiftUI
- Use a Xcode project to manage your code## How to use this
Clone or [download a release](https://github.com/fulldecent/swift6-module-template/releases) and run the `./configure.swift` program. It will ask you some questions and generate a project.
You then add all the interesting features you want your module to have.
### Automating the configure script
To skip interactive prompts in the `./configure.swift` script, use these environment variables:
| Template variable | Environment variable |
| -------------------------------- | ---------------------------------------- |
| `__PROJECT_NAME__` | `SMT_PROJECT_NAME` |
| `__ORGANIZATION NAME__` | `SMT_ORGANIZATION_NAME` |
| `com.AN.ORGANIZATION.IDENTIFIER` | `SMT_COM_AN_ORGANIZATION_IDENTIFIER` |
| `__AUTHOR NAME__` | `SMT_AUTHOR_NAME` |
| `__TODAYS_DATE__` | `SMT_TODAYS_DATE` |
| `__TODAYS_YEAR__` | `SMT_TODAYS_YEAR` |
| `__GITHUB_USERNAME__` | `SMT_GITHUB_USERNAME` |For example, you may use: `export SMT_ORGANIZATION_NAME='Awesome Org'` before running `./configure.swift`.
## How it works
```mermaid
graph LR
subgraph Contributors to this project
X[Use Xcode] --> R[Update Recipe.md]
R --> T[Update template]
end
T --> C
subgraph End users of this project
C[Run ./configure.rb] --> M[Use your own module]
end
```## Contributing
See the file [Recipe.md](Recipe.md) for the complete steps (e.g. Open Xcode, make new project, click here, type that, …) of how we made the template.