Skip to content

Instantly share code, notes, and snippets.

@alexcristea
Last active October 25, 2019 15:06
Show Gist options
  • Save alexcristea/a3fb47ea78b5ea4c49c44552e4fdf893 to your computer and use it in GitHub Desktop.
Save alexcristea/a3fb47ea78b5ea4c49c44552e4fdf893 to your computer and use it in GitHub Desktop.
README.md template for Swift based project

README badge-version

Use this section to provide easy access to CI pipeline, codecoverage and documentation.

Also, make sure to mention what package managers does your project support and under what licensing it is published.

badge-travis badge-codecov badge-docs badge-swift-pm badge-carthage badge-license badge-twitter

  1. Introduction
  2. Requirements
  3. Installation
  4. Usage Examples
  5. Contribute
  6. Meta

Introduction

Use this README.md template as a starting point for you next open source project 😌.

Edit this section to add one to two paragraph statement about your product and what it does.

Features

  • Feature 1
  • Feature 2
  • Feature 3
  • Feature 4
  • Feature 5

Requirements

Edit this section to specify the minimal requirements for your product.

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 11.0+
  • Swift 5.1+

Installation

Edit this section to add intructions on how one can install the product.

This template provides sub-sections for each major package manager. Please choose what best fits your product.

Carthage

You can use Carthage to install Product by adding it to your Cartfile:

github ":username/:product-url"

Run carthage update to build the framework and drag the built Product.framework into your Xcode project.

Setting up Carthage

Carthage is a decentralised dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

CocoaPods

You can use CocoaPods to install Product by adding it to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'YOUR_TARGET_NAME' do
	pod 'Product'
end

Then, run the following command:

$ pod install

Note that this requires CocoaPods version 1.0.0, and your iOS deployment target to be at least 8.0.

Setting up CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

Swift Package Manager

You can use the Swift Package Manager to install Product by adding it to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/:username/:product-url", majorVersion: 1),
    ]
)

Manually

To manually add this library in your project:

  1. for Projects, just drag the Sources folder into the project tree
  2. for Workspaces, include the whole Product.xcodeproj

Usage examples

Edit this section to add hands-on examples on how to use your product.

If, for example, your project has attached a project or a playground with a comprehensive list of examples, provide the necessary steps to get there.

For a comprehensive list of examples try the Examples.playground:

  1. Download the repository locally on your machine
  2. Open Product.workspace in Xcode
  3. Build Product Target
  4. Select the Examples.playground from the Project navigator.

Import

To get the full benefits, import Product wherever you import UIKit:

import UIKit
import Product

Product usage

The Product represents the core class and has the role to ...

let product = Product()
/// ....
Yet another example
let product = Product()
/// ....
And another one
let product = Product()
/// ....

Contribute

We would love you for the contribution to #project#, check the LICENSE file for more info.

Meta

This project is developed and maintained by the members of iOS NSAgora, the community of iOS Developers of Iași, Romania.

Distributed under the MIT license. See LICENSE for more information.

[https://gist.github.com/alexcristea/a3fb47ea78b5ea4c49c44552e4fdf893]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment