14.8 C
New York
Wednesday, December 11, 2024

Flutter/Flutter.h’ file not discovered whereas constructing iOS in Flutter


Title

'Flutter/Flutter.h' file not discovered whereas constructing iOS in Flutter

Description

I’m encountering the error 'Flutter/Flutter.h' file not discovered when attempting to construct my Flutter app for iOS. Beneath are the main points of my setting and the steps I’ve adopted to this point.

Atmosphere

  • Flutter model: 3.24.5
  • Xcode model: 16.1
  • macOS model: macOS 15.1
  • CocoaPods model: 1.16.2
  • iOS Deployment Goal: 12.0

Error

Right here is the precise error proven in Xcode:

/Customers/my_user/Paperwork/Tasks/my_project/ios/Runner/GeneratedPluginRegistrant.h:10:9: 'Flutter/Flutter.h' file not discovered

Related Code

The GeneratedPluginRegistrant.h file:

//
//  Generated file. Don't edit.
//

// clang-format off

#ifndef GeneratedPluginRegistrant_h
#outline GeneratedPluginRegistrant_h

#import   // The error happens right here

NS_ASSUME_NONNULL_BEGIN

@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject*)registry;
@finish

NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */

Steps Taken So Far

  1. Ran flutter clear adopted by flutter pub get.

  2. Deleted Pods and associated information:

    rm -rf ios/Pods ios/.symlinks ios/Flutter/Flutter.framework ios/Flutter/Flutter.podspec  
    
  3. Reinstalled Pods:

    cd ios  
    pod set up  
    
  4. Verified that the Podfile accommodates:

    flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))  
    
  5. Set the iOS deployment goal to 12.0 within the Podfile and Xcode.

  6. Tried recreating the iOS folder:

    rm -rf ios  
    flutter create .  
    cd ios  
    pod set up  
    
  7. Verified the Framework Search Paths in Xcode:

    $(inherited)  
    $(PROJECT_DIR)/Flutter  
    

Questions

  1. Why does the error Flutter/Flutter.h file not discovered happen?
  2. What ought to I verify or modify in my challenge to resolve this challenge?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles