Use this template as a starting point for any Swift 5 module that you want other people to include in their projects

Overview

Build Status

Swift 5 Module Template

Use this template as a starting point for any Swift 5 module that you want other people to include in their projects.

STATUS: This template is ready and works in production code, compatible with Xcode 12.4 (12D4e)

Swift 5 Module directory layout

Features

Your new Swift 5 module will immediately have working, compilable code, and all these features:

  • Ability to be used from Swift Package Manager, CocoaPods and Carthage
  • Clean folder structure
  • MIT license
  • Testing as a standard
  • Turnkey access to Travis CI
  • Semantic versioning and a CHANGELOG
  • Included example/demo app using SwiftUI

We make the assumption you are using an Xcode project to manage your code.

How to use this

Clone or download a release and run the ./configure program. It will ask you some questions and generate a project.

Or if you have CocoaPods installed, you can alternatively use:

pod lib create --verbose --template-url='https://github.com/fulldecent/swift5-module-template.git' MyNewPodName

You then add all the interesting features you want your module to have.

Using CocoaPods to manage dependencies for your example app

You distribute an example app with your new Swift module to show that it works. You may also decide to add UI tests to your example app and some people like to use testing frameworks for those UI tests. If you would like to use CocoaPods to manage the dependencies of your example app, please see the discussion at https://github.com/fulldecent/swift5-module-template/issues/8.

Automating the configure script

To skip interactive prompts in the ./configure 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_DATE__ (date format) SMT_DATE_FORMAT_STRING Note: this will ask you for today’s date but it will use this format in the template.
__TODAYS_YEAR__ SMT_TODAYS_YEAR
__GITHUB_USERNAME__ SMT_GITHUB_USERNAME

For example, you may use: export SMT_ORGANIZATION_NAME='Awesome Org' before running ./configure.

How it works

┌─────────────┐              ┌─────────────┐              ┌─────────────┐
│     Use     │              │    Save     │              │Use your own │
│    Xcode    │─Save recipe─▶│  template   │─./configure─▶│   module    │
└─────────────┘              └─────────────┘              └─────────────┘
       ▲              ▲             ▲               ▲            ▲       
                                                                         
       │              │             │               │            │       
        Contributors to this project          End users of this project

Contributing

See the file Recipe.md for the complete steps (e.g. Open Xcode, make new project, click here, type that, …) of how we made the template.

You might also like...
Bitcoin Development Kit - React Native Module

bdk-rn A React Native version of the Bitcon Development Kit (https://bitcoindevkit.org/) Table of Contents Installation Usage Library API Installation

Unmutify: Helping mute people to talk
Unmutify: Helping mute people to talk

Unmutify Helping mute people to talk Important Links Demo Video Devpost Problem Statement Many people are unable to talk due to their disabilities & m

Repository to help people learning testing

Testing Training The purpose of this repository is to help people learn the basics of testing in Swift. I decided to prepare this repository because m

BoldContacts mobile app for people with visual/cognitive/motor disabilities
BoldContacts mobile app for people with visual/cognitive/motor disabilities

BoldContacts mobile app BoldContacts™ is a mobile app that helps you browse your contacts and connect with them. BoldContacts is intended for people w

Are you sure the chemical compounds of your daily use are 100% safe? Use Chem-Aware, identify them right now!
Are you sure the chemical compounds of your daily use are 100% safe? Use Chem-Aware, identify them right now!

View Project On Devpost: Built With: PubChem's REST API How To Install Chem Aware: Prerequiste: Latest Version of Xcode and Simulators installed The a

Docker images for Swift on Raspberry Pi and other ARM devices from balena's base images.

Swift on Balena Welcome to Swift on Balena – a set of Docker images for Swift on Raspberry Pi and other ARM devices. These images are based on balena'

A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.
A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.

Lorem Introducing Lorem, a placeholder generator library for iOS to help you rapidly prototype, build and test your iOS applications. By leveraging Sw

A template to solve Advent of Code problems using Swift

Advent Of Code Swift Template This repository serves as a template for an Xcode project set up to solve the Advent of Code problems in Swift. No attem

UIKit-based app project template for Swift Playgrounds 4
UIKit-based app project template for Swift Playgrounds 4

playgrounds-uikit-app This is a simplistic sample template for Swift Playgrounds 4 to begin with a UIKit-based app delegate & window scene instead of

Owner
James Knipe
James Knipe
Static Native Template and Dynamic Styling without any other app release

FileManager Project Students and Freshers, Good opportunity for you to learn and contribute in this project. Here you would learn how you can change t

Naveen Chauhan 3 Nov 30, 2021
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

Julian F. Weinert 22 Nov 14, 2022
Calculate your tip and split the bill between any number of people

Calculate your tip and split the bill between any number of people

Tirupati Balan 6 Feb 9, 2022
The starting file for the 360iDev "It's Widget Time" workshop.

360iDevWidgets_start The starting file for the 360iDev "It's Widget Time" workshop. Syllabus This is a workshop to introduce you to adding widgets to

Steve Lipton 5 Dec 29, 2021
SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

Christopher Prince 12 Feb 10, 2022
Challenging each other to complete pet projects!

Podlodka Pet Project Challenge Мотивируем друг друга на завершение своих пет проджектов! Каждую неделю каждый участник вносит в банк 1 ставку и ведет

Vladimir Korolev 2 Aug 27, 2022
SwiftUITemplate - Template repository for SwiftUI projects

SwiftUITemplate Template repository for SwiftUI projects. Environment Name Versi

y-okudera 2 Jul 10, 2022
C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use

C-41 C-41 is an application to help people develop film at home by providing a series of "recipes" for photographers to use. The app demonstrates how

Ash Furrow 2.1k Jan 5, 2023
A zero-code template app that demonstrates how to use TheraForge's APIs and can be used for fast prototyping

TheraForge MagicBox 1.0.0-beta The Open TheraForge (OTF) MagicBox app is a template for creating digital health solutions that help people better mana

TheraForge 0 Dec 23, 2021
A ReactNative module for icloud operation

react-native-cloud-store A ReactNative module for cloud operation (currently only support icloud dirve) Developing, use at your risk, issue and PR is

xiao xin 24 Dec 22, 2022