diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index a8913f23..01d89d97 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -2293,7 +2293,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-D DEBUG -D STAGING_"; + OTHER_SWIFT_FLAGS = "-D DEBUG -D STAGING"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; diff --git a/Yep/Services/YepNetworking.swift b/Yep/Services/YepNetworking.swift index ca07fe13..bc7c6924 100644 --- a/Yep/Services/YepNetworking.swift +++ b/Yep/Services/YepNetworking.swift @@ -102,9 +102,9 @@ var yepNetworkActivityCount = 0 { #if STAGING class SessionDelegate: NSObject, NSURLSessionDelegate { - func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential!) -> Void) { + func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) { - completionHandler(.UseCredential, NSURLCredential(forTrust: challenge.protectionSpace.serverTrust)) + completionHandler(.UseCredential, NSURLCredential(forTrust: challenge.protectionSpace.serverTrust!)) } }