From 63eda69362e4308b85dc8402cf18bc4fbb288b78 Mon Sep 17 00:00:00 2001 From: Brian Batchelder Date: Mon, 20 Nov 2017 15:29:51 -0800 Subject: [PATCH] Release 8.6.3 (#1313) --- AirshipKit/AirshipConfig.xcconfig | 2 +- .../AirshipKit/common/UAirshipVersion.m | 2 +- .../AirshipKit/ios/UAInboxMessageList.m | 16 +++++++++---- .../AirshipKitTests/UAInboxMessageListTest.m | 23 ++++++++++++++----- CHANGELOG.md | 8 +++++++ UrbanAirship-iOS-AppExtensions.podspec | 2 +- UrbanAirship-iOS-SDK.podspec | 2 +- scripts/run_ci_tasks.sh | 2 +- 8 files changed, 41 insertions(+), 16 deletions(-) diff --git a/AirshipKit/AirshipConfig.xcconfig b/AirshipKit/AirshipConfig.xcconfig index 619a078fc..4511d51f7 100644 --- a/AirshipKit/AirshipConfig.xcconfig +++ b/AirshipKit/AirshipConfig.xcconfig @@ -1,6 +1,6 @@ // Copyright 2017 Urban Airship and Contributors -CURRENT_PROJECT_VERSION = 8.6.2 +CURRENT_PROJECT_VERSION = 8.6.3 // Uncomment to include the preview build warning // OTHER_CFLAGS = $(inherited) -DUA_PREVIEW=1 diff --git a/AirshipKit/AirshipKit/common/UAirshipVersion.m b/AirshipKit/AirshipKit/common/UAirshipVersion.m index 7930df2a3..b0b2331a9 100644 --- a/AirshipKit/AirshipKit/common/UAirshipVersion.m +++ b/AirshipKit/AirshipKit/common/UAirshipVersion.m @@ -2,7 +2,7 @@ #import "UAirshipVersion.h" -NSString *const versionString = @"8.6.2"; +NSString *const versionString = @"8.6.3"; @implementation UAirshipVersion diff --git a/AirshipKit/AirshipKit/ios/UAInboxMessageList.m b/AirshipKit/AirshipKit/ios/UAInboxMessageList.m index 36daad946..082cdc3f3 100644 --- a/AirshipKit/AirshipKit/ios/UAInboxMessageList.m +++ b/AirshipKit/AirshipKit/ios/UAInboxMessageList.m @@ -148,12 +148,16 @@ - (UADisposable *)retrieveMessageListWithSuccessBlock:(UAInboxMessageListCallbac }]; } else { UA_LDEBUG(@"Retrieve message list succeeded with status: %lu", (unsigned long)status); - completionBlock(YES); + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(YES); + }); } } onFailure:^(){ UA_LDEBUG(@"Retrieve message list failed"); - completionBlock(NO); + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(NO); + }); }]; return disposable; @@ -263,8 +267,8 @@ - (void)loadSavedMessages { /** - * Refreshes the publicly exposed inbox messages, by prefetching on the private - * context and then updating on the main context. + * Refreshes the publicly exposed inbox messages on the private context. + * The completion handler is executed on the main context. * * @param completionHandler Optional completion handler. */ @@ -295,7 +299,9 @@ - (void)refreshInboxWithCompletionHandler:(void (^)(void))completionHandler { self.messages = messages; if (completionHandler) { - completionHandler(); + dispatch_async(dispatch_get_main_queue(), ^{ + completionHandler(); + }); } }]; } diff --git a/AirshipKit/AirshipKitTests/UAInboxMessageListTest.m b/AirshipKit/AirshipKitTests/UAInboxMessageListTest.m index 27ec05672..cf6a13626 100644 --- a/AirshipKit/AirshipKitTests/UAInboxMessageListTest.m +++ b/AirshipKit/AirshipKitTests/UAInboxMessageListTest.m @@ -200,9 +200,14 @@ __block void (^trigger)(void) = ^{ }; }] retrieveMessageListOnSuccess:[OCMArg any] onFailure:[OCMArg any]]; - - [[self.mockMessageListNotificationObserver expect] messageListWillUpdate]; - [[self.mockMessageListNotificationObserver expect] messageListUpdated]; + XCTestExpectation *messageListWillUpdateExpectation = [self expectationWithDescription:@"messageListWillUpdate notification received"]; + XCTestExpectation *messageListUpdatedExpectation = [self expectationWithDescription:@"messageListUpdated notification received"]; + [[[self.mockMessageListNotificationObserver expect] andDo:^(NSInvocation *invocation) { + [messageListWillUpdateExpectation fulfill]; + }] messageListWillUpdate]; + [[[self.mockMessageListNotificationObserver expect] andDo:^(NSInvocation *invocation) { + [messageListUpdatedExpectation fulfill]; + }] messageListUpdated]; __block BOOL fail = NO; @@ -231,7 +236,7 @@ __block void (^trigger)(void) = ^{ }]; XCTAssertFalse(fail, @"callback blocks should not have been executed"); - + [self.mockMessageListNotificationObserver verify]; } @@ -255,8 +260,14 @@ __block void (^trigger)(void) = ^{ }; }] retrieveMessageListOnSuccess:[OCMArg any] onFailure:[OCMArg any]]; - [[self.mockMessageListNotificationObserver expect] messageListWillUpdate]; - [[self.mockMessageListNotificationObserver expect] messageListUpdated]; + XCTestExpectation *messageListWillUpdateExpectation = [self expectationWithDescription:@"messageListWillUpdate notification received"]; + XCTestExpectation *messageListUpdatedExpectation = [self expectationWithDescription:@"messageListUpdated notification received"]; + [[[self.mockMessageListNotificationObserver expect] andDo:^(NSInvocation *invocation) { + [messageListWillUpdateExpectation fulfill]; + }] messageListWillUpdate]; + [[[self.mockMessageListNotificationObserver expect] andDo:^(NSInvocation *invocation) { + [messageListUpdatedExpectation fulfill]; + }] messageListUpdated]; __block BOOL fail = NO; diff --git a/CHANGELOG.md b/CHANGELOG.md index 089716533..d30ce23d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ iOS Changelog Migration Guides: Documentation/Migration +Version 8.6.3 - November 20, 2017 +================================== +Patch release to address "UI API called on a background thread" warnings. Applications should update to this release if they are seeing these warnings. + +Bug fixes +--------- +- Fix UI API access on background thread in Message Center. + Version 8.6.2 - October 30, 2017 ================================== Patch release to correctly parse "mailto:" URLs in message center messages and enable optional localization of Message Center's "Done" and "Edit" buttons. Applications should update to this release if they require this behavior. diff --git a/UrbanAirship-iOS-AppExtensions.podspec b/UrbanAirship-iOS-AppExtensions.podspec index af0c1363b..db0b23de7 100644 --- a/UrbanAirship-iOS-AppExtensions.podspec +++ b/UrbanAirship-iOS-AppExtensions.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.version = "8.6.2" + s.version = "8.6.3" s.name = "UrbanAirship-iOS-AppExtensions" s.summary = "Urban Airship iOS App Extensions" diff --git a/UrbanAirship-iOS-SDK.podspec b/UrbanAirship-iOS-SDK.podspec index 5aacd2bc7..2c6cf1bbb 100644 --- a/UrbanAirship-iOS-SDK.podspec +++ b/UrbanAirship-iOS-SDK.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.version = "8.6.2" + s.version = "8.6.3" s.name = "UrbanAirship-iOS-SDK" s.summary = "Urban Airship iOS SDK" diff --git a/scripts/run_ci_tasks.sh b/scripts/run_ci_tasks.sh index 5330b4515..793b0789b 100755 --- a/scripts/run_ci_tasks.sh +++ b/scripts/run_ci_tasks.sh @@ -43,7 +43,7 @@ xcrun xcodebuild -destination "${TEST_DESTINATION}" -workspace "${ROOT_PATH}/Air # Run pod lib lint cd $ROOT_PATH -pod lib lint +pod lib lint --allow-warnings cd - # delete derived data