From 319a0ccc0ad122de85647cbfced35a40151a8576 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Wed, 5 Mar 2025 21:23:40 -0800 Subject: [PATCH] Remove [UIApplication openURL:] [UIApplication openURL:] has been deprecated since iOS 10, and has been rendered useless if compiling with Xcode 16. Since the earliest supported OS by FLEX is 10.3, let's remove this method from FLEX so that it doesn't trip static analyzers looking for the dead method. --- .../Sections/Shortcuts/FLEXUIAppShortcuts.m | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/Classes/ObjectExplorers/Sections/Shortcuts/FLEXUIAppShortcuts.m b/Classes/ObjectExplorers/Sections/Shortcuts/FLEXUIAppShortcuts.m index 7946645f40..3f5b7e711d 100644 --- a/Classes/ObjectExplorers/Sections/Shortcuts/FLEXUIAppShortcuts.m +++ b/Classes/ObjectExplorers/Sections/Shortcuts/FLEXUIAppShortcuts.m @@ -54,20 +54,16 @@ + (void)openURL:(NSString *)urlString NSURL *url = [NSURL URLWithString:urlString]; if (url) { - if (@available(iOS 10, *)) { - [app openURL:url options:@{ - UIApplicationOpenURLOptionUniversalLinksOnly: @(universalOnly) - } completionHandler:^(BOOL success) { - if (!success) { - [FLEXAlert showAlert:@"No Universal Link Handler" - message:@"No installed application is registered to handle this link." - from:host - ]; - } - }]; - } else { - [app openURL:url]; - } + [app openURL:url options:@{ + UIApplicationOpenURLOptionUniversalLinksOnly: @(universalOnly) + } completionHandler:^(BOOL success) { + if (!success) { + [FLEXAlert showAlert:@"No Universal Link Handler" + message:@"No installed application is registered to handle this link." + from:host + ]; + } + }]; } else { [FLEXAlert showAlert:@"Error" message:@"Invalid URL" from:host]; }