Code Monkey home page Code Monkey logo

ahavic1 / swift-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from klikaba/swift-template

0.0 1.0 0.0 1.82 MB

This is showcase application that presents how we, at Klika, are building robust and production-ready applications. Showcase includes different patterns and best practices that we are using in our company including : architectural patterns, configuration handling, error handling, automated testing, crash reporting, and so on.

Ruby 0.85% Swift 97.85% Makefile 0.37% Shell 0.93%

swift-template's Introduction

Build status

Swift template

A starting point for new iOS projects at Klika.

Setup

Dependencies

  • Overcommit
$ make install_dependencies

this script will:

  • install overcommit

Adding third-party dependencies with Swift Package Manager

  1. In Xcode, go to File > Swift packages > Add new package dependency
  2. Enter package repository URL and click next
  3. Choose version options and click next
  4. Select desired dependency targets and click finish

Configuration

For any environment specific configuration use \(schemeName).xcconfig specific configuration file which will handle configuration per specific scheme

Getting started

Use Klika quality guidelines for general development references.

Swift styleguides

A tool to enforce Swift style and conventions, loosely based on GitHub's Swift Style Guide.

certificate handling

Currently done manually.

Build scripts

We are currently using only one script:

  • runSwiftlint.sh | Runs swiftlint in debug configuration only

Scripts are located under BuildScripts folder at the root of the project.

Adding new build scripts

  1. Add script file to BuildScripts folder
  2. Use "chmod u+x [filePath]" to give script permission to be executed. E.g. chmod u+x BuildScripts/runSwiftlinth.sh
  3. In the Xcode file navigator, select .xcodeproj file and select "Build phases" tab
  4. Click on the plus icon and add new run script build phase. A new run script entry should appear at the end of the build phases list
  5. Expand newly added run script phase
  6. In the script editor, type out the path to script file. E.g. $SRCROOT/BuildScripts/runSwiftlint.sh. $SRCROOT refers to the root directory of the project.

Repeat steps 4, 5 and 6 for other targets from which you want to run the script.

New feature

Use GitFlow development workflow with controller tests and documentation included.

Pull request quality gates

  • no conflicts with target branch
  • pass Microsoft AppCenter tests (optional at the moment due to very long build time)
  • code review approval

Tools

Networking with Alamofire

Networking is implemented via Alamofire that enables easy parsing of response to ApI Models inside app together with Swift Codable protocol.

Bond

Simplify ViewController ViewModel binding using Bond

Quality gates

This project will run static code analyser on every commit.

Static code analyser

This template us using SwiftLint for static code analysis. All SwiftLint offenses are automatically tracked and prevented on every commit. This feature is handled by Overcommit git hook manager.

Testing

TBD

Continuous Integration

Microsoft AppCenter

Maintainers

swift-template's People

Contributors

zpasal avatar haris-dizdarevic avatar ahavic1 avatar ensar-sarajcic-klika avatar mrkvica avatar mirzabasic avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.