Procházet zdrojové kódy

Merge pull request #379 from imairi/bugfix/Demo_compartiple_xcode8_beta4

fix build errors on Xcode 8 beta 4 for Demo
Wei Wang před 9 roky
rodič
revize
585f035e1d

+ 2 - 0
Kingfisher.xcodeproj/project.pbxproj

@@ -1898,6 +1898,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 3.0;
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
@@ -1934,6 +1935,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = iphoneos;
+				SWIFT_VERSION = 3.0;
 				TARGETED_DEVICE_FAMILY = "1,2";
 				VALIDATE_PRODUCT = YES;
 			};

+ 1 - 1
Sources/ImageDownloader.swift

@@ -393,7 +393,7 @@ class ImageDownloaderSessionHandler: NSObject, URLSessionDataDelegate, Authentic
     /**
     This method is exposed since the compiler requests. Do not call it.
     */
-    internal func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: NSError?) {
+    internal func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
         
         if let URL = task.originalRequest?.url {
             if let error = error { // Error happened