Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Tool For Generating Swift/Objective-C Viper Module Skeletons

  •  
  •  
  •  
  •  
  •  

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:

.objc
+-- 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

ViperCode

You can find ViperCode on Github here.

A nice tool for generating Viper code.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments