Skip to content
/ URI Public
forked from ZewoGraveyard/URI

URI (RFC 3986) for Swift 2.2 on Linux

License

Notifications You must be signed in to change notification settings

bubski/URI

This branch is 1 commit ahead of, 63 commits behind ZewoGraveyard/URI:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2b754d0 · Dec 15, 2015

History

13 Commits
Nov 27, 2015
Nov 27, 2015
Dec 5, 2015
Dec 15, 2015
Nov 27, 2015
Nov 27, 2015
Dec 1, 2015
Nov 27, 2015

Repository files navigation

URI

Swift 2.1 Platforms OS X | iOS Cocoapods Compatible Carthage Compatible License MIT Slack Status

URI (RFC 3986) for Swift 2.

Features

  • No Foundation dependency (Linux ready)

Usage

let uri = URI(string: "abc://username:password@example.com: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

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build URI.

To integrate URI into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/Zewo/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

pod 'URI', '0.1'

Don't forget source 'https://github.com/Zewo/Specs.git'. This is very important. It should always come before the official CocoaPods repo.

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate URI into your Xcode project using Carthage, specify it in your Cartfile:

github "Zewo/URI" == 0.1

Command Line Application

To use URI in a command line application:

Community

Slack

Join us on Slack.

License

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

About

URI (RFC 3986) for Swift 2.2 on Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 96.4%
  • Ruby 3.6%