Skip to content

[webview_flutter] Contributions require special tooling #152352

@sumanthratna

Description

@sumanthratna

What package does this bug report belong to?

webview_flutter

What target platforms are you seeing this bug on?

iOS

Have you already upgraded your packages?

Yes

Dependency versions

N/A

Steps to reproduce

  1. git clone [email protected]:flutter/packages.git --depth 1
  2. cd packages/packages/webview_flutter/webview_flutter_wkwebview
  3. dart run pigeon --input pigeons/web_kit.dart
  4. cd example/
  5. flutter run

Expected results

The example app opens in the simulator without issue.

Actual results

When I run flutter run, I get an error caused by incorrect Pigeon codegen results.

When I run flutter run without running dart run pigeon --input pigeons/web_kit.dart, the example app opens without issue.

When I pin pigeon to 13.0.0, Pigeon still produces incorrect codegen results.

When I fix the mistake manually across all the generated files, flutter run succeeds.

I want to submit a PR to the webview_flutter package to implement a feature I need (flutter_inappwebview is not an alternative at the moment, since it does not provide a Privacy Manifest). I'd love to be able to contribute but am stuck as to why I can't run pigeon correctly.

What is the command that the Flutter team uses to run Pigeon for this package?

Code sample

N/A

Screenshots or Videos

N/A

Logs

flutter run Logs
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Running Xcode build...                                                  
Xcode build done.                                            3.7s
Failed to build iOS app
Semantic Issue (Xcode): Unknown type name 'FWFFWFWKNavigationResponsePolicyEnumBox'; did you mean
'FWFWKNavigationResponsePolicyEnumBox'?
.../flutter-packages/packages/webview_flutter/webview_flutter_wkwebview/ios/webview_flutter_wkwebview/So
urces/webview_flutter_wkwebview/include/webview_flutter_wkwebview/FWFGeneratedWebKitApis.h:707:226


Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.

This is the diff produced by running Pigeon: pigeon.patch

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.22.3 on channel stable at /Users/sumanthratna/flutter
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision b0850beeb2 (9 days ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3

[✗] Android toolchain - develop for Android devices
    ✗ ANDROID_HOME = /Users/sumanthratna/android-sdks
      but Android SDK not found at this location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.91.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.92.0

[✓] Connected device (1 available)
    • iPhone 15 Pro Max (mobile)      • 27C05A15-B3F2-47E0-9D20-7F8D0AB558B9 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions