You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For first, very good job, I'm trying to use your library and it appears that it's not compatible with URLSessionDelegate, in my app i'm using https with a self-signed certificate and I use URLSessionDelegate for debug and when i'm setup your library, delegate are not fired and make me errors.
Steps for reproducing: AppDelegate.swift
func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplicationLaunchOptionsKey:Any]?)->Bool{// Override point for customization after application launch.#if DEBUGDBDebugToolkit.setup()// <-- if I comment network works good#endif...
SSLDebugSessionDelegate.swift
classSSLDebugSessionDelegate:NSObject,URLSessionDelegate{/// The host to allow a self-signed SSL certificate for.lethost:String/** Designated initializer. - parameter host: The host to which the exception should apply */publicinit(host:String){self.host = host
}openfunc urlSession(_ session:URLSession, didReceive challenge:URLAuthenticationChallenge,
completionHandler:@escaping(URLSession.AuthChallengeDisposition,URLCredential?)->Void){Log.debug("----DEBUG SESSION DELEGATE----")
if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
if challenge.protectionSpace.host == host,let trust = challenge.protectionSpace.serverTrust {letcredential=URLCredential(trust: trust)completionHandler(.useCredential, credential)return}}completionHandler(.performDefaultHandling,nil)}}
Hi @aliasdoc, I just pushed a branch with code that I believe will fix your issues. Could you please take a look at it? That would be really helpful.
To do that, you can specify a branch in your Podfile like this: pod 'DBDebugToolkit', :git => 'https://github.com/dbukowski/DBDebugToolkit.git', :branch => 'bug-fix/self-signed-certificate'
If it does fix your issues I will merge it to the master branch and release a new version of DBDebugToolkit. If not, then I would like to ask you for more details about your issues.
Hi,
For first, very good job, I'm trying to use your library and it appears that it's not compatible with
URLSessionDelegate
, in my app i'm using https with a self-signed certificate and I useURLSessionDelegate
for debug and when i'm setup your library, delegate are not fired and make me errors.Steps for reproducing:
AppDelegate.swift
SSLDebugSessionDelegate.swift
And use a self-signed certificate.
The text was updated successfully, but these errors were encountered: