From 117cdd9b4b9c54ecbb3c73d17a2212ec24b783d1 Mon Sep 17 00:00:00 2001 From: Paul Hecker Date: Wed, 11 Apr 2018 12:31:54 +0200 Subject: [PATCH 1/3] Fixed compiler warnings in Xcode 9 --- Sources/Core/OMLazyPromise.h | 4 ++-- Sources/Core/OMLazyPromise.m | 4 ++-- Sources/Core/OMPromise.h | 4 ++-- Sources/Core/OMPromise.m | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/Core/OMLazyPromise.h b/Sources/Core/OMLazyPromise.h index 51a26d6..91b180c 100644 --- a/Sources/Core/OMLazyPromise.h +++ b/Sources/Core/OMLazyPromise.h @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN @return A new _lazy_ promise. @see lazyPromiseWithTask:on: */ -+ (OMLazyPromise *)promiseWithTask:(id (^)())task; ++ (OMLazyPromise *)promiseWithTask:(id (^)(void))task; /** Similar to promiseWithTask:, but executes the block on the specified queue. @@ -53,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN @return A new _lazy_ promise. @see lazyPromiseWithTask: */ -+ (OMLazyPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue; ++ (OMLazyPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue; + (OMLazyPromise *)promiseWithDetailedTask:(void (^)(OMDeferred *deferred))task; diff --git a/Sources/Core/OMLazyPromise.m b/Sources/Core/OMLazyPromise.m index aa78b10..445c743 100644 --- a/Sources/Core/OMLazyPromise.m +++ b/Sources/Core/OMLazyPromise.m @@ -49,11 +49,11 @@ - (instancetype)initWithTask:(void (^)(OMDeferred *))task on:(dispatch_queue_t)q return self; } -+ (OMLazyPromise *)promiseWithTask:(id (^)())task { ++ (OMLazyPromise *)promiseWithTask:(id (^)(void))task { return [OMLazyPromise promiseWithTask:task on:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; } -+ (OMLazyPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue { ++ (OMLazyPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue { return [[OMLazyPromise alloc] initWithTask:^(OMDeferred *deferred) { id result = task(); diff --git a/Sources/Core/OMPromise.h b/Sources/Core/OMPromise.h index 2e5c0ef..e2b66d8 100644 --- a/Sources/Core/OMPromise.h +++ b/Sources/Core/OMPromise.h @@ -183,7 +183,7 @@ extern NSString *const OMPromisesErrorDomain; @see promiseWithTask:on: @see promiseWithLazyTask: */ -+ (OMPromise *)promiseWithTask:(id (^)())task; ++ (OMPromise *)promiseWithTask:(id (^)(void))task; /** Similar to promiseWithTask:, but executes the block on a specific queue. @@ -192,7 +192,7 @@ extern NSString *const OMPromisesErrorDomain; @return A new promise. @see promiseWithTask: */ -+ (OMPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue; ++ (OMPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue; /** Create a fulfilled promise. diff --git a/Sources/Core/OMPromise.m b/Sources/Core/OMPromise.m index ba1980e..445df06 100644 --- a/Sources/Core/OMPromise.m +++ b/Sources/Core/OMPromise.m @@ -91,11 +91,11 @@ - (OMPromise *)on:(dispatch_queue_t)queue { #pragma mark - Return -+ (OMPromise *)promiseWithTask:(id (^)())task { ++ (OMPromise *)promiseWithTask:(id (^)(void))task { return [OMPromise promiseWithTask:task on:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; } -+ (OMPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue { ++ (OMPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue { return [[OMPromise promiseWithResult:nil] then:^(id _) { return task(); From dbfb05908a75d5a2e1ac58f888aeba5c71eac6ce Mon Sep 17 00:00:00 2001 From: Paul Hecker Date: Wed, 16 May 2018 09:05:07 +0200 Subject: [PATCH 2/3] Fixed pod file for travis --- Project/Podfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Project/Podfile b/Project/Podfile index 19205b6..f136abd 100644 --- a/Project/Podfile +++ b/Project/Podfile @@ -1,17 +1,14 @@ -target :ios do +target 'iOS-Tests' do platform :ios, '5.0' - link_with 'iOS-Tests' pod 'OMPromises/HTTP', :path => '../' end -target :osx do +target 'OSX-Tests' do platform :osx, '10.7' - link_with 'OSX-Tests' pod 'OMPromises/HTTP', :path => '../' end -target :tvos do +target 'tvOS-Tests' do platform :tvos, '9.0' - link_with 'tvOS-Tests' pod 'OMPromises/HTTP', :path => '../' end From b60507dffb9e6ff198de356b672f56c6c5f4344f Mon Sep 17 00:00:00 2001 From: Paul Hecker Date: Wed, 16 May 2018 09:13:53 +0200 Subject: [PATCH 3/3] More travis fixes --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7696b28..0cccf85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,15 +3,15 @@ osx_image: xcode7.2 env: matrix: - - OPTIONS="-sdk iphonesimulator -scheme iOS-Tests test -parallelize" - - OPTIONS="-scheme OSX-Tests test -parallelize" - - OPTIONS="-scheme tvOS-Tests build-tests CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO" + - OPTIONS="-sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' -scheme iOS-Tests test" + - OPTIONS="-scheme OSX-Tests test" + - OPTIONS="-scheme tvOS-Tests test CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO" before_script: - cd Project/ && pod install script: - - xctool -workspace OMPromises.xcworkspace $OPTIONS + - xcodebuild -workspace OMPromises.xcworkspace $OPTIONS notifications: email: false