Latest 0.1
Homepage https://github.com/Zewo/URI
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Authors

Swift 2.2
Platforms Linux
License MIT
Slack Status

URI (RFC 3986) for Swift 2.2.

Usage

let uri = URI(string: "abc://username:[email protected]:123/path/data?key=value#fragid1")

uri.scheme // "abc"
uri.userInfo?.username // "username"
uri.userInfo?.password // "password"
uri.host // "example.com"
uri.port // 123
uri.path // "/path/data"
uri.query["key"] // "value"
uri.fragment // "fragid1"

let uri = URI(path: "/api/v1/tasks", query: ["done": "true"])

uri.path // "/api/v1/tasks"
uri.query["done"] // "true"

Installation

Homebrew

$ brew tap zewo/tap
$ brew install uri_parser

Ubuntu/Debian

$ echo "deb [trusted=yes] http://apt.zewo.io/deb ./" | sudo tee --append /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install uri_parser

Source

$ git clone https://github.com/Zewo/uri_parser.git && cd uri_parser
$ make
$ (sudo) make install
  • Add URI to your Package.swift
import PackageDescription

let package = Package(
    dependencies: [
        .Package(url: "https://github.com/Zewo/URI.git", majorVersion: 0, minor: 2)
    ]
)

Community

Slack

Join us on Slack.

License

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

Latest podspec

{
    "name": "URI",
    "version": "0.1",
    "license": "MIT",
    "summary": "URI (RFC 3986) for Swift 2 (Linux ready)",
    "homepage": "https://github.com/Zewo/URI",
    "authors": {
        "Paulo Faria": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Zewo/URI.git",
        "tag": "0.1"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source_files": [
        "Dependencies/Itsari/*.c",
        "URI/**/*.swift"
    ],
    "xcconfig": {
        "SWIFT_INCLUDE_PATHS": "$(SRCROOT)/URI/Dependencies"
    },
    "preserve_paths": "Dependencies/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This