Skip to content

[HGNN-10153] xcode 버전업(iOS 18 SDK or later) 대응 #11

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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 package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-inappbrowser",
"version": "5.0.20-hogangnono",
"version": "5.0.24-hogangnono-dev",
"description": "Cordova InAppBrowser Plugin",
"types": "./types/index.d.ts",
"cordova": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-inappbrowser"
version="5.0.20-hogangnono">
version="5.0.24-hogangnono-dev">

<name>InAppBrowser</name>
<description>Cordova InAppBrowser Plugin</description>
Expand Down
9 changes: 5 additions & 4 deletions src/ios/CDVWKInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@ - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options

- (void)openInSystem:(NSURL*)url
{
if ([[UIApplication sharedApplication] openURL:url] == NO) {
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
[[UIApplication sharedApplication] openURL:url];
}
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
if (!success) {
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
}
}];
Comment on lines +369 to +373

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

With the introduction of openURL:options:completionHandler:, is the NSNotificationCenter fallback still necessary? It might be redundant, or it might be handling a specific edge case. Consider adding a comment explaining why this fallback is still needed, or removing it if it's no longer required. It's not clear what the purpose of posting the notification is, since the app is already attempting to open the URL. Perhaps it's to notify other parts of the app that the URL is being opened, but this should be clarified.

}

- (void)loadAfterBeforeload:(CDVInvokedUrlCommand*)command
Expand Down
2 changes: 1 addition & 1 deletion src/ios/SVWebViewControllerActivityChrome.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (void)performActivity {
NSURL *chromeURL = [NSURL URLWithString:chromeURLString];

// Open the URL with Chrome.
[[UIApplication sharedApplication] openURL:chromeURL];
[[UIApplication sharedApplication] openURL:chromeURL options:@{} completionHandler:nil];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Why is the completion handler set to nil here? Is there a reason why success/failure isn't being handled in this case, unlike in CDVWKInAppBrowser.m?

}
}

Expand Down
5 changes: 3 additions & 2 deletions src/ios/SVWebViewControllerActivitySafari.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ - (BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
}

- (void)performActivity {
BOOL completed = [[UIApplication sharedApplication] openURL:self.URLToOpen];
[self activityDidFinish:completed];
[[UIApplication sharedApplication] openURL:self.URLToOpen options:@{} completionHandler:^(BOOL success) {
[self activityDidFinish:success];
}];
Comment on lines +28 to +30

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to SVWebViewControllerActivityChrome.m, the completion handler is used, but it only calls activityDidFinish:. Is there a reason why the success/failure of opening the URL isn't being handled more explicitly, as in CDVWKInAppBrowser.m?

}

@end
89 changes: 0 additions & 89 deletions src/osx/CDVInAppBrowser.m

This file was deleted.