Cobra is a lightweight application routing framework written in Swift
Alternatives To Cobra
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
3 years ago1April 15, 20207mitSwift
LiteRoute is easy transition for your app. Written on Swift 4
6 years agomitSwift
Evolution of MVC on iOS with examples. MVC, VIPER, MVVM, MVP
25 years ago5October 22, 2018apache-2.0Swift
Cobra is a lightweight application routing framework written in Swift
5 years ago3mitSwift
Routing in an iOS app abstracted
Vipers Wireframe Protocol3
7 years agomitSwift
The wireframe is the powerful thing that wires the view controllers in your app together. It takes an NSURL and some parameters, talks to the components that create your view controllers (the ControllerProvider) which create the view controller connected to this URL, and gives it to those components which are responsible for presenting your controller (the ControllerRoutingPresenter).
8 months agoSwift
This Todo app is a full reference implementation for VIPER. It demonstrates many of the tasks you would do on a daily basis.
Alternatives To Cobra
Select To Compare

Alternative Project Comparisons


Build Status

Cobra is a lightweight application routing framework written in Swift that provides modular abstractions to your code base. Cobra is built on top of Swinject, a lightweight dependency injection framework.


  • [X] Type safe application routing via features
  • [X] Multiple flavor (e.g. environments) support for different components
  • [X] Proxy powered routing for easy A/B testing of features
  • [X] Foundation for modular code architecture

Cobra works best when used with Gorgon, an application event distribution framework written in Swift, and Moccasin, Xcode templates that provides VIPER-based scaffolding.

See Boa, a sample app written in Swift, for details.


  • iOS 8+
  • Swift 3
  • Xcode 8.0+


Cobra is available through CocoaPods or Carthage.


To install Cobra with CocoaPods, add the following lines to your Podfile.

source ''
platform :ios, '8.0'

pod 'Cobra', '~> 3.0'

Then run pod install command. For details of the installation and usage of CocoaPods, visit its official website.


To install Cobra with Carthage, add the following line to your Cartfile.

github "locationlabs/Cobra" ~> 3.0

Then run carthage update. For details of the installation and usage of Carthage, visit its project page.


Cobra is a VIPER-based application routing framework for building modular iOS applications. Using Cobra, an application is broken up into VIPER modules, each module consisting of the following types: View, Interactor, Presenter, Router, Data Manager, Styler, Assembler, Storyboard and Feature. Each of these types own a single responsibility, i.e. the View is responsible for view logic, the Interactor is responsible for business logic, etc. Dividing application logic into distinct layers of responsibility this way enables developers to isolate dependencies, test interactions, and generally write clear and consistent code.

Creating a Module

Cobra works best when used with Moccasin, which leverages Xcode templates to generate VIPER-based scaffolding.


Component frameworks and VIPER modules are bootstrapped like so:

    // Create a Cobra configuration for assembling the components and properties for the application
    let config = Config(components: [
    ], properties: [
        JsonProperty(name: "properties")
    // Provide the configuration to the Cobra application
    try! App.sharedInstance.config(config)

    // Register Feature to Module proxies for the Cobra application routes
        Proxy<AddCityFeatureType>(modules: Module<AddCityAssembly>()),
        Proxy<WeatherFeatureType>(modules: Module<WeatherAssembly>()),
        Proxy<WeatherDetailFeatureType>(modules: Module<WeatherDetailAssembly>())
    // Route to our first feature in our application window
    try! App.sharedInstance.feature(WeatherFeatureType.self).showInWindow(window!)
    return true
Popular Routing Projects
Popular Viper Projects
Popular Networking Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ios Swift