This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[webview_flutter] Remove warnings regarding iOS9 SDK methods#1976
Merged
amirh merged 9 commits intoflutter:masterfrom Aug 15, 2019
Merged
[webview_flutter] Remove warnings regarding iOS9 SDK methods#1976amirh merged 9 commits intoflutter:masterfrom
amirh merged 9 commits intoflutter:masterfrom
Conversation
added 4 commits
August 14, 2019 11:47
…ns into webview_flutter/ios9_warnings
jmagman
reviewed
Aug 14, 2019
| - (void)clearCookies:(FlutterResult)result { | ||
| if (@available(iOS 9.0, *)) { | ||
| [self clearCookiesIos9AndLater:result]; | ||
| NSSet *websiteDataTypes = [NSSet setWithArray:@[ WKWebsiteDataTypeCookies ]]; |
Member
There was a problem hiding this comment.
I know you just copied these lines, but since you're already touching this code would you mind adding generics and removing the unnecessary NSArray alloc:
NSSet<NSString *> *websiteDataTypes = [NSSet setWithObject:WKWebsiteDataTypeCookies];
Contributor
Author
There was a problem hiding this comment.
Nice, I did not know Obj-C can now do generics. Added this change, thx!
sungmin-park
pushed a commit
to sungmin-park/flutter-plugins
that referenced
this pull request
Dec 17, 2019
…#1976) Including the webview_flutter plugin currently creates a few warnings rgd. methods not being available on iOS9 and so forth. It may be personal taste, but I find them distracting - and technically the method is not really protected by the @available block so it will be useful to move the code back into it. The plugin also migrates the example project files to the latest Xcode recommendation which removes compilation warnings as well. After this PR, the compiler warnings for the webview_example are gone completely:
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
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
Including the
webview_flutterplugin currently creates a few warnings rgd. methods not being available on iOS9 and so forth.It may be personal taste, but I find them distracting - and technically the method is not really protected by the
@availableblock so it will be useful to move the code back into it.The plugin also migrates the example project files to the latest Xcode recommendation which removes compilation warnings as well.
After this PR, the compiler warnings for the webview_example are gone completely:
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?
@jmagman hi! I have seen your comments rgd. iOS compiler warnings and best practices in the past. Could you comment on this, please? Also, do you recommend that the Flutter templates (iOS plugin parts) could be updated to reflect latest Xcode recommendations?