Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
internal let DEFAULT_MIME_TYPE = "application/octet-stream" | |
internal let mimeTypes = [ | |
"html": "text/html", | |
"htm": "text/html", | |
"shtml": "text/html", | |
"css": "text/css", | |
"xml": "text/xml", | |
"gif": "image/gif", | |
"jpeg": "image/jpeg", |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
struct VehicleCheck { | |
let sections: [Section] | |
} |
public enum GitHub { | |
case zen | |
case userProfile(String) | |
case userRepositories(String) | |
} | |
extension GitHub: TargetType { | |
public var baseURL: URL { return URL(string: "https://api.github.com")! } | |
public var path: String { | |
switch self { |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// ----------------------- | |
// User obj | |
// + JSON decode | |
// + Transform to NSManagedObject |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// Network service | |
// + Support plugins. For instance, Logger, Credential and NetworkActivity | |
// + Support Caching |
func testOrdinaryCase() { | |
let input = "Linearity is the property of a mathematical relationship or function which means that it can be graphically represented as a straight line. Examples are the relationship of voltage and current across a resistor, or the mass and weight of an object." | |
let expected = ["1/6 Linearity is the property of a mathematical", | |
"2/6 relationship or function which means that it", | |
"3/6 can be graphically represented as a straight", | |
"4/6 line. Examples are the relationship of voltage", | |
"5/6 and current across a resistor, or the mass and", | |
"6/6 weight of an object."] | |
let output = Utils.split(input, limit: limit) |
This document is published in the style of a "Swift evolution manifesto", outlining a long-term view of how to tackle a very large problem. It explores one possible approach to adding a first-class concurrency model to Swift, in an effort to catalyze positive discussion that leads us to a best-possible design. As such, it isn't an approved or finalized design
I hereby claim:
To claim this, I am signing this object:
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"