فهرست منبع

Update for beta 2.

Jon Shier 9 سال پیش
والد
کامیت
b7e808e1f0

+ 10 - 1
Alamofire.xcodeproj/project.pbxproj

@@ -814,7 +814,7 @@
 			isa = PBXProject;
 			attributes = {
 				LastSwiftUpdateCheck = 0700;
-				LastUpgradeCheck = 0700;
+				LastUpgradeCheck = 0800;
 				ORGANIZATIONNAME = Alamofire;
 				TargetAttributes = {
 					4CCB207C1D45563900C64D5B = {
@@ -1270,6 +1270,7 @@
 				PRODUCT_NAME = Alamofire;
 				SDKROOT = appletvos;
 				SKIP_INSTALL = YES;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
@@ -1306,6 +1307,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.Alamofire-tvOSTests";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
@@ -1363,6 +1365,7 @@
 				PRODUCT_NAME = Alamofire;
 				SDKROOT = macosx;
 				SKIP_INSTALL = YES;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 			};
 			name = Release;
@@ -1419,6 +1422,7 @@
 				PRODUCT_NAME = Alamofire;
 				SDKROOT = watchos;
 				SKIP_INSTALL = YES;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 				TARGETED_DEVICE_FAMILY = 4;
 			};
@@ -1448,6 +1452,7 @@
 				ENABLE_TESTABILITY = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUG=1",
@@ -1497,6 +1502,7 @@
 				ENABLE_NS_ASSERTIONS = NO;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -1562,6 +1568,7 @@
 				PRODUCT_NAME = Alamofire;
 				SKIP_INSTALL = YES;
 				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 			};
 			name = Release;
@@ -1596,6 +1603,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.$(PRODUCT_NAME:rfc1034identifier)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 			};
 			name = Release;
@@ -1641,6 +1649,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.$(PRODUCT_NAME:rfc1034identifier)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = macosx;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 2.3;
 			};
 			name = Release;

+ 1 - 1
Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire OSX.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0700"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0700"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire tvOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0710"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire watchOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0700"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0700"
+   LastUpgradeVersion = "0800"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 3 - 3
Source/ServerTrustPolicy.swift

@@ -182,7 +182,7 @@ public enum ServerTrustPolicy {
         case let .PerformDefaultEvaluation(validateHost):
             let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil)
             #if swift(>=2.3)
-                SecTrustSetPolicies(serverTrust, [policy!])
+                SecTrustSetPolicies(serverTrust, policy)
             #else
                 SecTrustSetPolicies(serverTrust, [policy])
             #endif
@@ -192,7 +192,7 @@ public enum ServerTrustPolicy {
             if validateCertificateChain {
                 let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil)
             #if swift(>=2.3)
-                SecTrustSetPolicies(serverTrust, [policy!])
+                SecTrustSetPolicies(serverTrust, policy)
             #else
                 SecTrustSetPolicies(serverTrust, [policy])
             #endif
@@ -220,7 +220,7 @@ public enum ServerTrustPolicy {
             if validateCertificateChain {
                 let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil)
             #if swift(>=2.3)
-                SecTrustSetPolicies(serverTrust, [policy!])
+                SecTrustSetPolicies(serverTrust, policy)
             #else
                 SecTrustSetPolicies(serverTrust, [policy])
             #endif

+ 1 - 56
Tests/ServerTrustPolicyTests.swift

@@ -242,11 +242,7 @@ class ServerTrustPolicyExplorationBasicX509PolicyValidationTestCase: ServerTrust
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift (>=2.3)
-        let policies = [SecPolicyCreateBasicX509()!]
-    #else
         let policies = [SecPolicyCreateBasicX509()]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -259,11 +255,7 @@ class ServerTrustPolicyExplorationBasicX509PolicyValidationTestCase: ServerTrust
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift (>=2.3)
-        let policies = [SecPolicyCreateBasicX509()!]
-    #else
         let policies = [SecPolicyCreateBasicX509()]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -276,11 +268,7 @@ class ServerTrustPolicyExplorationBasicX509PolicyValidationTestCase: ServerTrust
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift (>=2.3)
-        let policies = [SecPolicyCreateBasicX509()!]
-    #else
         let policies = [SecPolicyCreateBasicX509()]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -293,11 +281,7 @@ class ServerTrustPolicyExplorationBasicX509PolicyValidationTestCase: ServerTrust
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift (>=2.3)
-        let policies = [SecPolicyCreateBasicX509()!]
-    #else
         let policies = [SecPolicyCreateBasicX509()]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -319,11 +303,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -336,11 +316,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -353,11 +329,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -370,11 +342,8 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
+
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -387,11 +356,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -404,11 +369,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -421,19 +382,11 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [
-            SecPolicyCreateSSL(true, "test.alamofire.org")!,
-            SecPolicyCreateSSL(true, "blog.alamofire.org")!,
-            SecPolicyCreateSSL(true, "www.alamofire.org")!
-        ]
-    #else
         let policies = [
             SecPolicyCreateSSL(true, "test.alamofire.org"),
             SecPolicyCreateSSL(true, "blog.alamofire.org"),
             SecPolicyCreateSSL(true, "www.alamofire.org")
         ]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -446,11 +399,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, nil)!]
-    #else
         let policies = [SecPolicyCreateSSL(true, nil)]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then
@@ -463,11 +412,7 @@ class ServerTrustPolicyExplorationSSLPolicyValidationTestCase: ServerTrustPolicy
         setRootCertificateAsLoneAnchorCertificateForTrust(trust)
 
         // When
-    #if swift(>=2.3)
-        let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")!]
-    #else
         let policies = [SecPolicyCreateSSL(true, "test.alamofire.org")]
-    #endif
         SecTrustSetPolicies(trust, policies)
 
         // Then