Skip to content

<Flutter/Flutter.h> cannot be imported when a pod transitive depends on Flutter #126251

@intspt

Description

@intspt

Is there an existing issue for this?

Steps to reproduce

run the project in bug_demo directory.

Expected results

Build Success.

Actual results

Build Failed.

Code sample

https://github.com/intspt/bug_demo

Screenshots or Video

Screenshots / Video demonstration

image

Logs

Logs
In file included from /Users/spt/Developer/bug_demo/bug_demo/ios/NativePod/Classes/test.m:1:
/Users/spt/Developer/bug_demo/bug_demo/ios/NativePod/Classes/test.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
        ^~~~~~~~~~~~~~~~~~~
1 error generated.

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.7.12 on channel stable at /Users/spt/.flutterHomeOfficial3.0
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • Pub download mirror https://pub.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/spt/Library/Android/sdk
    • Platform android-32, build-tools 32.0.0
    • ANDROID_SDK_ROOT = /Users/spt/Library/Android/sdk
    • Java binary at: /Users/spt/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/spt/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (5 available)
    • M2012K11AC (mobile)        • 3514df5f                             • android-arm64  • Android 13 (API 33)
    • iPhone (mobile)            • 00008020-000954E136A1002E            • ios            • iOS 16.4.1 20E252
    • iPhone 14 Pro Max (mobile) • C247BDBA-F6F2-4DF3-8E25-A511C760D87D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 13.3.1 22E261 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 112.0.5615.137

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfound in release: 3.11Found to occur in 3.11found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions