Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit f1073fc

Browse files
committed
fix: iOS run exception,conflict with webview_flutter: ^2.8.0(Issues #9 #11
1 parent 1b9a05b commit f1073fc

File tree

13 files changed

+60
-20
lines changed

13 files changed

+60
-20
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.0.3
2+
- fix: iOS run exception,conflict with webview_flutter: ^2.8.0(Issues #9 #11
3+
14
## 1.0.2
25
- support select pdf|doc|xls files(Issues #6
36

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flutter WebView Pro
22

3-
[![pub package](https://img.shields.io/badge/pub-v1.0.2-orange)](https://pub.dartlang.org/packages/flutter_webview_pro)
3+
[![pub package](https://img.shields.io/badge/pub-v1.0.3-orange)](https://pub.dartlang.org/packages/flutter_webview_pro)
44

55
A Flutter plugin that provides a WebView widget who Support photo upload/take camera and Geolocation.
66
The official flutter plugin `webview_flutter` Android does not support H5 file upload, that is, it does not support the H5 code below.
@@ -18,7 +18,7 @@ Add this to your package's `pubspec.yaml` file:
1818

1919
```yaml
2020
dependencies:
21-
flutter_webview_pro: ^1.0.2
21+
flutter_webview_pro: ^1.0.3
2222
```
2323
2424
## Import
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/zhimingwen/Develop/GitHub/flutter_webview_pro/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/zhimingwen/Develop/flutter/packages/integration_test/

example/ios/Podfile.lock

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
PODS:
2+
- Flutter (1.0.0)
3+
- flutter_webview_pro (1.0.0):
4+
- Flutter
5+
- integration_test (0.0.1):
6+
- Flutter
7+
- OCMock (3.5)
8+
9+
DEPENDENCIES:
10+
- Flutter (from `Flutter`)
11+
- flutter_webview_pro (from `.symlinks/plugins/flutter_webview_pro/ios`)
12+
- integration_test (from `.symlinks/plugins/integration_test/ios`)
13+
- OCMock (= 3.5)
14+
15+
SPEC REPOS:
16+
trunk:
17+
- OCMock
18+
19+
EXTERNAL SOURCES:
20+
Flutter:
21+
:path: Flutter
22+
flutter_webview_pro:
23+
:path: ".symlinks/plugins/flutter_webview_pro/ios"
24+
integration_test:
25+
:path: ".symlinks/plugins/integration_test/ios"
26+
27+
SPEC CHECKSUMS:
28+
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
29+
flutter_webview_pro: 569314997078b3d00ae8fd6aaa791832efff1795
30+
integration_test: 7db6d89f336f671dcbc7563ee27a5b08f6f8aee1
31+
OCMock: 4ab4577fc941af31f4a0398f6e7e230cf21fc72a
32+
33+
PODFILE CHECKSUM: b36feef8b3c1de558c5a548dd556cc98c8b0ca10
34+
35+
COCOAPODS: 1.11.2
Binary file not shown.

example/ios/Runner/GeneratedPluginRegistrant.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#import "GeneratedPluginRegistrant.h"
88

9-
#if __has_include(<flutter_webview_pro/FLWebViewFlutterPlugin.h>)
10-
#import <flutter_webview_pro/FLWebViewFlutterPlugin.h>
9+
#if __has_include(<flutter_webview_pro/WebViewProFlutterPlugin.h>)
10+
#import <flutter_webview_pro/WebViewProFlutterPlugin.h>
1111
#else
1212
@import flutter_webview_pro;
1313
#endif
@@ -21,7 +21,7 @@
2121
@implementation GeneratedPluginRegistrant
2222

2323
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
24-
[FLWebViewFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLWebViewFlutterPlugin"]];
24+
[WebViewProFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"WebViewProFlutterPlugin"]];
2525
[IntegrationTestPlugin registerWithRegistrar:[registry registrarForPlugin:@"IntegrationTestPlugin"]];
2626
}
2727

ios/Classes/FlutterWebView.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#import "FlutterWebView.h"
66
#import "FLWKNavigationDelegate.h"
7-
#import "FLWKProgressionDelegate.h"
7+
#import "ProWKProgressionDelegate.h"
88
#import "JavaScriptChannelHandler.h"
99

1010
@implementation FLWebViewFactory {
@@ -65,7 +65,7 @@ @implementation FLWebViewController {
6565
// The set of registered JavaScript channel names.
6666
NSMutableSet* _javaScriptChannelNames;
6767
FLWKNavigationDelegate* _navigationDelegate;
68-
FLWKProgressionDelegate* _progressionDelegate;
68+
ProWKProgressionDelegate* _progressionDelegate;
6969
}
7070

7171
- (instancetype)initWithFrame:(CGRect)frame
@@ -336,7 +336,7 @@ - (NSString*)applySettings:(NSDictionary<NSString*, id>*)settings {
336336
NSNumber* hasProgressTrackingValue = settings[key];
337337
bool hasProgressTracking = [hasProgressTrackingValue boolValue];
338338
if (hasProgressTracking) {
339-
_progressionDelegate = [[FLWKProgressionDelegate alloc] initWithWebView:_webView
339+
_progressionDelegate = [[ProWKProgressionDelegate alloc] initWithWebView:_webView
340340
channel:_channel];
341341
}
342342
} else if ([key isEqualToString:@"debuggingEnabled"]) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
NS_ASSUME_NONNULL_BEGIN
1010

11-
@interface FLWKProgressionDelegate : NSObject
11+
@interface ProWKProgressionDelegate : NSObject
1212

1313
- (instancetype)initWithWebView:(WKWebView *)webView channel:(FlutterMethodChannel *)channel;
1414

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#import "FLWKProgressionDelegate.h"
5+
#import "ProWKProgressionDelegate.h"
66

7-
NSString *const FLTWKEstimatedProgressKeyPath = @"estimatedProgress";
7+
NSString *const ProWKEstimatedProgressKeyPath = @"estimatedProgress";
88

9-
@implementation FLWKProgressionDelegate {
9+
@implementation ProWKProgressionDelegate {
1010
FlutterMethodChannel *_methodChannel;
1111
}
1212

@@ -15,22 +15,22 @@ - (instancetype)initWithWebView:(WKWebView *)webView channel:(FlutterMethodChann
1515
if (self) {
1616
_methodChannel = channel;
1717
[webView addObserver:self
18-
forKeyPath:FLTWKEstimatedProgressKeyPath
18+
forKeyPath:ProWKEstimatedProgressKeyPath
1919
options:NSKeyValueObservingOptionNew
2020
context:nil];
2121
}
2222
return self;
2323
}
2424

2525
- (void)stopObservingProgress:(WKWebView *)webView {
26-
[webView removeObserver:self forKeyPath:FLTWKEstimatedProgressKeyPath];
26+
[webView removeObserver:self forKeyPath:ProWKEstimatedProgressKeyPath];
2727
}
2828

2929
- (void)observeValueForKeyPath:(NSString *)keyPath
3030
ofObject:(id)object
3131
change:(NSDictionary<NSKeyValueChangeKey, id> *)change
3232
context:(void *)context {
33-
if ([keyPath isEqualToString:FLTWKEstimatedProgressKeyPath]) {
33+
if ([keyPath isEqualToString:ProWKEstimatedProgressKeyPath]) {
3434
NSNumber *newValue =
3535
change[NSKeyValueChangeNewKey] ?: 0; // newValue is anywhere between 0.0 and 1.0
3636
int newValueAsInt = [newValue floatValue] * 100; // Anywhere between 0 and 100

0 commit comments

Comments
 (0)