All Projects → codytwinton → Swiftyviper

codytwinton / Swiftyviper

Licence: mit
Swift Interaction with VIPER Architecture

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftyviper

Xestimonitors
An extensible monitoring framework written in Swift
Stars: ✭ 269 (+144.55%)
Mutual labels:  tvos, cocoapod
QuizKit
⁉️ A framework for developing local or remote quiz apps for iOS or tvOS
Stars: ✭ 28 (-74.55%)
Mutual labels:  tvos, cocoapod
Mixpanel
Unofficial Swift Mixpanel client
Stars: ✭ 93 (-15.45%)
Mutual labels:  tvos
Sniffer
Networking activity logger for Swift
Stars: ✭ 108 (-1.82%)
Mutual labels:  tvos
Sdwebimagewebpcoder
A WebP coder plugin for SDWebImage, use libwebp
Stars: ✭ 101 (-8.18%)
Mutual labels:  tvos
Defaultskit
Simple, Strongly Typed UserDefaults for iOS, macOS and tvOS
Stars: ✭ 1,343 (+1120.91%)
Mutual labels:  tvos
Awesome Rubymotion
A collection of awesome RubyMotion example apps, libraries, tools, frameworks, software and resources
Stars: ✭ 103 (-6.36%)
Mutual labels:  tvos
Kvconstraintkit
An Impressive Auto Layout DSL for iOS, tvOS & OSX. & It is written in pure swift.
Stars: ✭ 91 (-17.27%)
Mutual labels:  tvos
Swift Sdk
LeanCloud Swift SDK
Stars: ✭ 110 (+0%)
Mutual labels:  tvos
Prex
🔁Unidirectional data flow architecture with MVP and Flux combination for Swift
Stars: ✭ 102 (-7.27%)
Mutual labels:  tvos
Gin Web
由gin + gorm + jwt + casbin组合实现的RBAC权限管理脚手架Golang版, 搭建完成即可快速、高效投入业务开发
Stars: ✭ 107 (-2.73%)
Mutual labels:  viper
Webmidikit
Simplest MIDI Swift library
Stars: ✭ 100 (-9.09%)
Mutual labels:  tvos
Predicateflow
Write amazing, strong-typed and easy-to-read NSPredicate.
Stars: ✭ 98 (-10.91%)
Mutual labels:  tvos
Jvfloatingdrawer
An easy to use floating drawer view controller.
Stars: ✭ 1,424 (+1194.55%)
Mutual labels:  cocoapod
Egocache
Fast Caching for Objective-C (iPhone & Mac Compatible)
Stars: ✭ 1,339 (+1117.27%)
Mutual labels:  tvos
Conbini
Publishers, operators, and subscribers to supplement Combine.
Stars: ✭ 109 (-0.91%)
Mutual labels:  tvos
R.objc
Get autocompleted resources like images, localized strings and storyboards in ObjC projects
Stars: ✭ 92 (-16.36%)
Mutual labels:  tvos
Id3tageditor
🎵🎸A Swift library to read and write ID3 Tag of any mp3 file. Supported ID3 tag version: 2.2, 2.3 and 2.4. Supported platform: iOS, macOS, tvOS, watchOS, Linux Ubuntu. 🎵🎸
Stars: ✭ 101 (-8.18%)
Mutual labels:  tvos
Datepicker
A Date Picker with Calendar for iPhone and iPad Apps.
Stars: ✭ 103 (-6.36%)
Mutual labels:  cocoapod
Phalgo
phalgo 已经更换为 https://github.com/sunmi-OS/gocore phalgo不在维护
Stars: ✭ 110 (+0%)
Mutual labels:  viper

SwiftyVIPER

Header


Language License Platform

Build Status Docs Percentage Code Coverage Code Beat

Pod Version Carthage Compatible

SwiftyVIPER allows easy use of VIPER architecture throughout your iOS application.

VIPER Architecture

What is VIPER? Great question! VIPER is a backronym which stands for:

  • View
  • Interactor
  • Presenter
  • Entity
  • Router

If all of this is totally new for you, check out my running list of VIPER Resources

Features

  • [x] VIPER Module Templates
  • [x] VIPER Unit Test Templates
  • [x] Simple Module Initialization and Presentation
  • [x] CocoaPods Support
  • [x] Carthage Support

Requirements

  • iOS 8.0+ | tvOS 9.0+
  • Xcode 9
  • Swift 4

Installation

CocoaPods

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

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

def shared_pods
    pod 'SwiftyVIPER', '~> 1.0'
end

target 'MyApp' do
    shared_pods
end

target 'MyAppTests' do
    shared_pods
end

To get the full benefits import SwiftyVIPER wherever you import UIKit

import UIKit
import SwiftyVIPER

Carthage

Carthage is a decentralized 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

To integrate SwiftyVIPER into your Xcode project using Carthage, specify it in your Cartfile:

github "codytwinton/SwiftyVIPER" ~> 1.0

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

Manually

This is discouraged, but allowed. :D

  1. Download and drop the Source folder in your project.
  2. Congratulations!

Usage of SwiftyVIPER

Installing Templates

If you're looking for VIPER architecture templates to use directly within Xcode, you can find these in the /Templates/VIPER folder. Open your terminal and run:

cd PATH/TO/REPO

Then, simply run this command in your terminal:

mkdir -p ~/Library/Developer/Xcode/Templates/File\ Templates
cp -R Templates/VIPER ~/Library/Developer/Xcode/Templates/File\ Templates

Adding a Module

Once you've installed the VIPER Templates, you're ready to add a module. Select File > New > File or use press ⌘N to bring up the template selector. You'll find the templates at the bottom.

Choose Module for a normal module, Module Storyboard for a normal module that interacts with Storyboards, or Module Tests for a module unit tests template.

![Choice](Assets/Template Choice.png)

Next, choose the Module name. We'll go with Custom.

![Name](Assets/Template Name.png)

This will create 5 files per module:

  • CustomModule.swift
  • CustomViewController.swift
  • CustomPresenter.swift
  • CustomRouter.swift
  • CustomInteractor.swift

Don't forget to target your main app. Once you've added the main template, go ahead and add the Unit Test template. Make sure it's the same name! In this case, we'd stay with Custom.

Using SwiftyVIPER

Simply add a new module using the VIPER template. Once done, simply call:

import SwiftyVIPER

CustomModule().present(from: self.viewController, style: .coverVertical, completion: nil)

The module will handle the rest, including initializing and attaching all the connections necessary for the Module to show properly.

Contribute

We would love for you to contribute to SwiftyVIPER, check the LICENSE file for more info. Pull Requests welcome!

Resources

Meta

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].