Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x.x] Replace deprecated openURL method preventing launch URLs #1493

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
});
}];
Expand Down
5 changes: 1 addition & 4 deletions iOS_SDK/OneSignalSDK/Source/OneSignalLocation.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading