This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[url_launcher] avoid deprecation warning in guarded code #1611
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
The `[application openURL:]` was deprecated in iOS 10. Since we are already using the newer API on iOS 10 and newer, this warning can be safely ignored.
Avoids the following output when building a flutter app that uses this plugin:
```
url_launcher-5.0.2/ios/Classes/UrlLauncherPlugin.m:141:33: warning: 'openURL:' is deprecated: first
deprecated in iOS 10.0 - Please use openURL:options:completionHandler: instead [-Wdeprecated-declarations]
BOOL success = [application openURL:url];
^
In module 'UIKit' imported from /Users/linus/coding/eego/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:128:1: note:
'openURL:' has been explicitly marked deprecated here
- (BOOL)openURL:(NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS("");
^
3 warnings generated.
```
mklim
approved these changes
Jul 25, 2019
Contributor
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix!
Whoops. Pub switches its semver scheme from 0.x.y+z to x.y.z depending on whether or not a package is above or below 1.0.0.
Contributor
Author
|
Thanks! |
mithun-mondal
pushed a commit
to bKash-developer/archived_plugins
that referenced
this pull request
Aug 6, 2019
The `[application openURL:]` was deprecated in iOS 10. Since we are already using the newer API on iOS 10 and newer, this warning can be safely ignored.
Avoids the following output when building a flutter app that uses this plugin:
```
url_launcher-5.0.2/ios/Classes/UrlLauncherPlugin.m:141:33: warning: 'openURL:' is deprecated: first
deprecated in iOS 10.0 - Please use openURL:options:completionHandler: instead [-Wdeprecated-declarations]
BOOL success = [application openURL:url];
^
In module 'UIKit' imported from /Users/linus/coding/eego/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:128:1: note:
'openURL:' has been explicitly marked deprecated here
- (BOOL)openURL:(NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS("");
^
3 warnings generated.
```
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Description
The
[application openURL:]was deprecated in iOS 10. Since we are already using the newer API on iOS 10 and newer, this warning can be safely ignored.Avoids the following output when building a flutter app that uses this plugin:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?