Latest 0.1.2
Homepage https://github.com/DarkKnightOne/NPRouter
License MIT
Platforms ios 8.0
Authors

Router

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Step1. Register

let urlString = "example://module/path0/path1?uid=123"
do {
    try NPRouter.register(urlString, { (route) in
        print("route open:(route.description)")
    })
} catch {
    print("router error:(error.localizedDescription)")
}

Step2. Open Handle

if NPRouter.canOpen(urlString) {
    var parameters = Parameters()
    parameters["userName"] = "DarkKnightOne"
    try? NPRouter.open(urlString, parameters)
}

Example Result

route open:Route:[4111069943906038498] Url=example://module/path0/path1?uid=123, Scheme=example, Host=module, Path=/path0/path1, Query: ["uid:123"]

Requirements

Installation

Router is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'NPRouter'

Author

DarkKnightOne, [email protected]

License

Router is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NPRouter",
    "version": "0.1.2",
    "summary": "A Simple Pure Swift Router in iOS.",
    "description": "Router can decoupled module with module in Project, It`s a good choice.",
    "homepage": "https://github.com/DarkKnightOne/NPRouter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DarkKnightOne": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DarkKnightOne/NPRouter.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Router/Classes/**/*"
}

Pin It on Pinterest

Share This