I found a gist that describes a way to make it work with Playgrounds. It circumvents the need to alter the ATS settings. Create an object conforming to URLSessionDelegate
with the following implementation:
public class NetworkEnabler: NSObject, NSURLSessionDelegate {
public func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) {
completionHandler(.UseCredential, NSURLCredential(trust: challenge.protectionSpace.serverTrust!))
}
}
and create a session with an instance as its delegate: URLSession(configuration: .default, delegate: enabler, delegateQueue: nil)
. Using that session for requests will allow you to use Charles.