flutter-plugins
flutter-plugins copied to clipboard
[desktop_webview_window] Webview doesn't work on macOS
When I try to launch a webview window, it instead launches a copy of the main app, and when that tries to launch a webview window, it crashes.
Reproduce Steps
lib/main.dart:
import 'package:flutter/material.dart';
import 'package:desktop_webview_window/desktop_webview_window.dart';
void main(List<String> arguments) {
runApp(
MaterialApp(
home: Scaffold(
body: OutlinedButton(
child: FlutterLogo(),
onPressed: () {
WebviewWindow.create().then((webview) {
webview.launch('example.com');
});
},
),
),
),
);
}
Run the app, press the button. Then, press the button on the new window that launched.
what it looks like
Version (please complete the following information):
- Flutter Version:
3.22.0-31.0.pre.3 - OS: macOS 14.4.1
- plugin: desktop_webview_window
I also ran into the same problem, my solution is to add non-HTTP support, I wonder if it will work for you? You can have a try.
Add the following to the Info.plist file:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
I also ran into the same problem, my solution is to add non-HTTP support, I wonder if it will work for you? You can have a try.
Add the following to the Info.plist file:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
error: "Runner" has entitlements that require signing with a development certificate. Enable development signing in the Signing & Capabilities editor. (in target 'Runner' from project 'Runner')