Skip to content
Permalink
Browse files

Updates for Xcode 9.3 (#2473)

* Fix notification tests in Swift 4.1, add IDEWorkspace chcks.

* Update Travis for Xcode 9.3.

* Update project settings.

* Use Travis 9.3beta image.
  • Loading branch information...
jshier committed Mar 31, 2018
1 parent ef48870 commit e6c26e0db37798fff13e1bd99a63e107ed972783
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode9.3beta
branches:
only:
- master
@@ -14,16 +14,16 @@ env:
- WATCHOS_FRAMEWORK_SCHEME="Alamofire watchOS"
- EXAMPLE_SCHEME="iOS Example"
matrix:
- DESTINATION="OS=4.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=4.3,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=2.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=11.2,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=11.3,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"

- DESTINATION="OS=11.2,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=11.3,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"

@@ -1647,7 +1647,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 3.0;
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -440,7 +440,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 3.0;
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.6)
CFPropertyList (3.0.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
@@ -48,7 +48,7 @@ GEM
ffi (1.9.23)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.2)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jazzy (0.9.1)
@@ -62,9 +62,9 @@ GEM
xcinvoke (~> 0.3.0)
liferaft (0.0.6)
minitest (5.11.3)
molinillo (0.6.4)
molinillo (0.6.5)
mustache (0.99.8)
nanaimo (0.2.3)
nanaimo (0.2.4)
nap (1.1.0)
netrc (0.11.0)
open4 (1.3.4)
@@ -74,7 +74,7 @@ GEM
redcarpet (3.4.0)
rouge (3.1.1)
ruby-macho (1.1.0)
sass (3.5.5)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -85,12 +85,12 @@ GEM
thread_safe (~> 0.1)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.5.6)
CFPropertyList (~> 2.3.3)
xcodeproj (1.5.7)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
nanaimo (~> 0.2.4)

PLATFORMS
ruby
@@ -525,8 +525,12 @@ class SessionDelegateTestCase: BaseTestCase {
// Given
var notificationCalledWithResponseData = false
var response: HTTPURLResponse?

let expectation = self.expectation(forNotification: Notification.Name.Task.DidComplete.rawValue, object: nil) { notif -> Bool in
#if swift(>=4.1)
let notification = Notification.Name.Task.DidComplete
#else
let notification = Notification.Name.Task.DidComplete.rawValue
#endif
let expectation = self.expectation(forNotification: notification, object: nil) { notif -> Bool in

// check that we are handling notif for a dataTask
guard let task = notif.userInfo?[Notification.Key.Task] as? URLSessionDataTask else {
@@ -557,8 +561,12 @@ class SessionDelegateTestCase: BaseTestCase {
// Given
var notificationCalledWithNilResponseData = false
var response: HTTPURLResponse?

let expectation = self.expectation(forNotification: Notification.Name.Task.DidComplete.rawValue, object: nil) { notif -> Bool in
#if swift(>=4.1)
let notification = Notification.Name.Task.DidComplete
#else
let notification = Notification.Name.Task.DidComplete.rawValue
#endif
let expectation = self.expectation(forNotification: notification, object: nil) { notif -> Bool in

// check that we are handling notif for a downloadTask
guard let task = notif.userInfo?[Notification.Key.Task] as? URLSessionDownloadTask else {
@@ -573,7 +581,7 @@ class SessionDelegateTestCase: BaseTestCase {
}

// When
manager.download("https://httpbin.org/get").response {resp in }
manager.download("https://httpbin.org/get").response { resp in }

wait(for: [expectation], timeout: timeout)

0 comments on commit e6c26e0

Please sign in to comment.
You can’t perform that action at this time.