Skip to content

Commit

Permalink
Revert "Initial iOS implementation for webview_flutter. (flutter#890)"
Browse files Browse the repository at this point in the history
This reverts commit eca232c.
  • Loading branch information
andreidiaconu authored Feb 17, 2019
1 parent 1b3396c commit 27601a9
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 168 deletions.
2 changes: 0 additions & 2 deletions packages/webview_flutter/example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
Expand Down
20 changes: 0 additions & 20 deletions packages/webview_flutter/ios/Classes/FlutterWebView.h

This file was deleted.

126 changes: 0 additions & 126 deletions packages/webview_flutter/ios/Classes/FlutterWebView.m

This file was deleted.

12 changes: 0 additions & 12 deletions packages/webview_flutter/ios/Classes/WebViewFlutterPlugin.m

This file was deleted.

24 changes: 24 additions & 0 deletions packages/webview_flutter/ios/Classes/WebviewFlutterPlugin.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "WebviewFlutterPlugin.h"

@implementation FLTWebviewFlutterPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel =
[FlutterMethodChannel methodChannelWithName:@"webview_flutter"
binaryMessenger:[registrar messenger]];
FLTWebviewFlutterPlugin* instance = [[FLTWebviewFlutterPlugin alloc] init];
[registrar addMethodCallDelegate:instance channel:channel];
}

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
if ([@"getPlatformVersion" isEqualToString:call.method]) {
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
} else {
result(FlutterMethodNotImplemented);
}
}

@end
8 changes: 0 additions & 8 deletions packages/webview_flutter/lib/webview_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ class _WebViewState extends State<WebView> {
creationParamsCodec: const StandardMessageCodec(),
),
);
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
return UiKitView(
viewType: 'plugins.flutter.io/webview',
onPlatformViewCreated: _onPlatformViewCreated,
gestureRecognizers: widget.gestureRecognizers,
creationParams: _CreationParams.fromWidget(widget).toMap(),
creationParamsCodec: const StandardMessageCodec(),
);
}
return Text(
'$defaultTargetPlatform is not yet supported by the webview_flutter plugin');
Expand Down

0 comments on commit 27601a9

Please sign in to comment.