Skip to content
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

How to clear cookies (iOS) #200

Closed
hungps opened this issue Oct 2, 2018 · 13 comments
Closed

How to clear cookies (iOS) #200

hungps opened this issue Oct 2, 2018 · 13 comments

Comments

@hungps
Copy link

hungps commented Oct 2, 2018

The options clearCookies work perfectly on Android but not working on iOS

webview.launch(
    "https://google.com",
    clearCache: true,
    clearCookies: true,
);
@YukiOya
Copy link

YukiOya commented Nov 6, 2018

#228 will solve your problem.
You can use fixed branch like this until merged.

dependencies:
  flutter_webview_plugin:
    git:
      url: git://github.com/YukiOya/flutter_webview_plugin.git

@hungps
Copy link
Author

hungps commented Nov 11, 2018

@YukiOya

Hi,
I got some problem while using your fork

Launching lib/main.dart on iPhone 6 in debug mode...
Xcode build done.                                            3.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET connectivity OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from /Users/scit/flutter/.pub-cache/git/flutter_webview_plugin-15df49d1f0299759e6efc4790950d7a5ba101591/ios/Classes/FlutterWebviewPlugin.m:1:
In file included from /Users/scit/flutter/.pub-cache/git/flutter_webview_plugin-15df49d1f0299759e6efc4790950d7a5ba101591/ios/Classes/FlutterWebviewPlugin.h:1:
In file included from /Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/Flutter.h:44:
In file included from /Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterAppDelegate.h:11:
In file included from /Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:13:
/Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlatformViews.h:25:11: warning: parameter 'viewIdentifier' not found in the function declaration [-Wdocumentation]
* @param viewIdentifier A unique identifier for this `UIView`.
^~~~~~~~~~~~~~
/Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlatformViews.h:26:11: warning: parameter 'arguments' not found in the function declaration [-Wdocumentation]
* @param arguments Parameters for creating the `UIView` sent from the Dart side of the Flutter app.
^~~~~~~~~
In file included from /Users/scit/flutter/.pub-cache/git/flutter_webview_plugin-15df49d1f0299759e6efc4790950d7a5ba101591/ios/Classes/FlutterWebviewPlugin.m:1:
In file included from /Users/scit/flutter/.pub-cache/git/flutter_webview_plugin-15df49d1f0299759e6efc4790950d7a5ba101591/ios/Classes/FlutterWebviewPlugin.h:1:
In file included from /Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/Flutter.h:44:
In file included from /Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterAppDelegate.h:11:
/Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:213:11: warning: parameter 'factoryId::' not found in the function declaration [-Wdocumentation]
* @param factoryId:: A unique identifier for the factory, the Dart code of the Flutter app can use
^~~~~~~~~~~
/Users/scit/Sources/flutter-apfptpoly/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:213:11: note: did you mean 'factoryId'?
* @param factoryId:: A unique identifier for the factory, the Dart code of the Flutter app can use
^~~~~~~~~~~
factoryId
/Users/scit/flutter/.pub-cache/git/flutter_webview_plugin-15df49d1f0299759e6efc4790950d7a5ba101591/ios/Classes/FlutterWebviewPlugin.m:78:112: error: use of undeclared identifier 'WKWebsiteDataTypeFetchCache'
NSSet *dataTypes = [NSSet setWithArray:@[WKWebsiteDataTypeDiskCache, WKWebsiteDataTypeMemoryCache, WKWebsiteDataTypeFetchCache]];
^
3 warnings and 1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone 6.
Exited (sigterm)

@YukiOya
Copy link

YukiOya commented Nov 11, 2018

@scitbiz
What Xcode version do you use?
WKWebsiteDataTypeFetchCache is implemented from iOS 11.3.
If you use older, you try to update Xcode 10 or later. It maybe resolve.

@slightfoot
Copy link
Member

Should be fixed as of v0.3.0+2. Please retest.

@hungps
Copy link
Author

hungps commented Nov 15, 2018

Should be fixed as of v0.3.0+2. Please retest.

Hi @slightfoot,
After update to v0.3.0+2, my webview no longer show up in the screen.

@bagintz
Copy link

bagintz commented Nov 21, 2018

For whatever it is worth, clearing cookies did not work for me either on v0.3.0+2

@colelawrence
Copy link

The PR works for me, the current version does not unfortunately.

@CaleyD
Copy link

CaleyD commented Mar 28, 2019

This PR works for our application as well 👍

@edwardez
Copy link

edwardez commented May 8, 2019

As of 0.3.5, clearCookies is still not working for me on iOS 12.2 simulator, however the pr works like a charm!

@nnecec
Copy link

nnecec commented Jul 9, 2019

please solve this problem

@chynnasevilleno
Copy link

Any updates on this? Been having the same problem.

@charafau
Copy link
Collaborator

fixed in 0.3.7

@gugadev
Copy link

gugadev commented Jun 6, 2022

fixed in 0.3.7

The problem persists in 0.4.0 for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests