Earlier this week I mentioned a nice guide on different software architectures which provides a nice overview of different software architectures commonly mentioned in the iOS realm including the VIPER architecture.
Here’s an open source tool submitted by Sameh Mabrouk that allows you to generate VIPER module skeletons called ViperCode.
Viper can generate both module, and unit test files, operates as a separate app so it can be used with both Xcode and AppCode, and generates either Swift or Objective-C code.
This is the file structure generated by ViperCode:
+– DataManager
| +– VIPERDataManager.h
| +– VIPERDataManager.m
+– Interactor
| +– VIPERInteractor.h
| +– VIPERInteractor.m
+– Presenter
| +– VIPERPresenter.h
| +– VIPERPresenter.m
+– ViewController
| +– VIPERViewController.h
| +– VIPERViewController.m
+– WireFrame
| +– VIPERWireFrame.h
| +– VIPERWireFrame.m
+– Protocols
| +– VIPERProtocols.h
.objc tests
+– Interactor
| +– VIPERInteractorTests.m
+– Presenter
| +– VIPERPresenterTests.m
+– ViewController
| +– VIPERViewControllerTests.m
+– WireFrame
| +– VIPERWireFrameTests.m
.swift
+– DataManager
| +– VIPERDataManager.swift
+– Interactor
| +– VIPERInteractor.swift
+– Presenter
| +– VIPERPresenter.swift
+– ViewController
| +– VIPERViewController.swift
+– WireFrame
| +– VIPERWireFrame.swift
+– Protocols
| +– VIPERProtocols.swift
.swift tests
+– Interactor
| +– VIPERInteractorTests.swift
+– Presenter
| +– VIPERPresenterTests.swift
+– ViewController
| +– VIPERViewTests.swift
+– WireFrame
| +– VIPERWireFrameTests.swift
You can find ViperCode on Github here.
A nice tool for generating Viper code.
Original article: Open Source Tool For Generating Swift/Objective-C Viper Module Skeletons
©2016 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.
