Latest 0.0.3
Homepage https://github.com/shotastage/DeepLinkRouter
License MIT
Platforms ios 10.0
Authors

Build Status
Carthage compatible
Version
CocoaPods
License
Platform

DeepLinkRouter is deep link manager for Swift.

Installation

CocoaPods

pod 'DeepLinkRouter'

Carthage

github "shotastage/DeepLinkRouter" "0.0.3"

Basic Usage

First, import DeepLinkRouter.
THen, override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey :Any] = [:]) -> Bool and register host & path like below.

URL: your-app://host/path

Example
your-app://next/movie

import UIKit
import DeepLinkRouter

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    ...

    func application(_ app: UIApplication,
                     open url: URL,
                     options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

        let router = Router(from: url)

        router
            .register(path: "next/movie", {
                NSLog("LOG: Movie action has been launched!")
            })

            .register(path: "next/photo", {
                NSLog("LOG: Photo action has been launched!")
            })

            .register(path: "next/music", {
                NSLog("LOG: Music action has been launched!")
            })

            .performRouter()

        return true
    }

    ...

}

License

This software is freely distributed under the MIT, see LICENSE for detail.

Latest podspec

{
    "name": "DeepLinkRouter",
    "version": "0.0.3",
    "summary": "Router for iOS deep link.",
    "homepage": "https://github.com/shotastage/DeepLinkRouter",
    "license": "MIT",
    "authors": {
        "Shota Shimazu": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/shotastage/DeepLinkRouter.git",
        "tag": "0.0.3"
    },
    "source_files": "DeepLinkRouter/*.{swift, h, m}"
}

Pin It on Pinterest

Share This