Updated CDVWKInAppBrowser.m to fix iOS link opening issue #870
+9
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update resolves an issue where links were not opening on iOS devices due to the deprecated openURL method. The fix replaces openURL: with openURL:options:completionHandler:, ensuring compatibility with iOS 10+ and preventing deprecation warnings.
### Changes Made:
Updated CDVWKInAppBrowser.m to use openURL:options:completionHandler: instead of the deprecated openURL:.
Ensured backward compatibility with older iOS versions.
Verified that the fix does not impact Android functionality.
### Impact & Testing:
Links now open correctly on all supported iOS versions.
The fix has been tested on real iOS devices.
No impact on Android functionality.
### - URL handling improvements:
ionic/platforms/browser/cordova/plugins/InAppBrowser/src/ios/CDVWKInAppBrowser.m
: UpdatedopenInSystem
method to check if the URL can be opened before attempting to open it, and to useopenURL:options:completionHandler:
.ionic/platforms/ios/AppsMobileCompany/Plugins/InAppBrowser/CDVWKInAppBrowser.m
: UpdatedopenInSystem
method to check if the URL can be opened before attempting to open it, and to useopenURL:options:completionHandler:
.siberian/var/apps/ionic/ios/AppsMobileCompany/Plugins/InAppBrowser/CDVWKInAppBrowser.m
: UpdatedopenInSystem
method to check if the URL can be opened before attempting to open it, and to useopenURL:options:completionHandler:
.This contribution was made by ---, developer at Migastone International Srl.