From 9388dfe157ab3cba93a9e24485211a51cc439176 Mon Sep 17 00:00:00 2001 From: Nan Date: Sun, 6 Oct 2024 17:22:15 -0700 Subject: [PATCH 1/2] [maintenance] replace deprecated openURL method * openURL: is completely deprecated on ios 18, so replace with the updated openURL:options:completionHandler: --- iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m | 2 +- iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m index fef164465..fa1677d59 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m @@ -544,7 +544,7 @@ + (void)displayWebView:(NSURL*)url { [webVC showInApp]; } else { // Keep dispatch_async. Without this the url can take an extra 2 to 10 secounds to open. - [[UIApplication sharedApplication] openURL:url]; + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; } }); }]; diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m b/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m index 48001f2b3..eae98b060 100644 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m @@ -293,10 +293,7 @@ + (void)showLocationSettingsAlertController { [[OneSignalDialogController sharedInstance] presentDialogWithTitle:@"Location Not Available" withMessage:@"You have previously denied sharing your device location. Please go to settings to enable." withActions:@[@"Open Settings"] cancelTitle:@"Cancel" withActionCompletion:^(int tappedActionIndex) { if (tappedActionIndex > -1) { [OneSignal onesignalLog:ONE_S_LL_DEBUG message:@"CLLocationManage open settings option click"]; - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated" - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; - #pragma clang diagnostic pop + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil]; } [OneSignalLocation sendAndClearLocationListener:false]; return; From d2994efdc97df996815c5d81db644d5e41122751 Mon Sep 17 00:00:00 2001 From: Nan Date: Fri, 26 Apr 2024 10:08:43 -0700 Subject: [PATCH 2/2] [ci] use `macos-latest-large` to have swiftlint * `macos-latest` recently migrated from macos-12 to macos-14 Arm64, the latter of which does not ship with swiftlint * `macos-latest-large` is also a macos-14 image and does ship with swiftlint --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2560ef151..4481f42a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: build: name: Build and Test using any available iPhone simulator - runs-on: macos-latest + runs-on: macos-latest-large steps: - name: Checkout OneSignal-iOS-SDK