Latest 1.0
License MIT
Platforms ios 8.0
Authors ,

Carthage compatible

A Swift Router Implementation.


  • iOS 8+
  • Xcode 6.3+


You can use Carthage:

github "ramy-kfoury/SwiftRouter"

or CocoaPods:

pod 'SwiftMessageBar'


To use the router, first create an instance of it in your AppDelegate class, and then update the following method:

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
        return router.routeURL(url)

Adding a route requires only a route parameter, and a closure to implement your action

addRoute(yourCustomRoute) { [unowned self] parameters in
            // present a view controller or anything you like to do when this route is detected

The closure returns to you the parsed parameters, which can be either path parameters or query parameters. Here’s an example:

route = scheme://host/path/parameter1/value1?parameter2=value2
parameters = [
"parameter1": "value1"
"parameter2": "value2"

To call a route from anywhere in your app:



  • Investigate using NSURLComponents for better parsing of routes


SwiftRouter is released under the MIT license. See LICENSE for details

Latest podspec

    "name": "SwiftRouter",
    "version": "1.0",
    "summary": "A Swift Router",
    "description": "                   A longer description of SwiftMessageBar in Markdown format.nn                   * Think: Why did you write this? What is the focus? What does it do?n                   * CocoaPods will be using this to generate tags, and improve search results.n                   * Try to keep it short, snappy and to the point.n                   * Finally, don't worry about the indent, CocoaPods strips it!n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Ramy Kfoury": "",
        "Jan Gorman": ""
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "1.0"
    "source_files": "SwiftRouter/SwiftRouter/*.swift"

Pin It on Pinterest

Share This