Vishwa Fernando
Vishwa Fernando

Reputation: 91

Build IOS in flutter it's showing GeneratedPluginRegistrant.m Plugin headers not found ex :(#import <firebase_analytics/FirebaseAnalyticsPlugin.h>)

//  Generated file. Do not edit.

#import "GeneratedPluginRegistrant.h"
#import <firebase_analytics/FirebaseAnalyticsPlugin.h>
#import <firebase_auth/FirebaseAuthPlugin.h>
#import <firebase_core/FirebaseCorePlugin.h>
#import <firebase_storage/FirebaseStoragePlugin.h>
#import <flutter_facebook_login/FacebookLoginPlugin.h>
#import <google_sign_in/GoogleSignInPlugin.h>
#import <image_picker/ImagePickerPlugin.h>
#import <path_provider/PathProviderPlugin.h>
#import <shared_preferences/SharedPreferencesPlugin.h>

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  [FLTFirebaseAnalyticsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAnalyticsPlugin"]];
  [FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]];
  [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
  [FLTFirebaseStoragePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseStoragePlugin"]];
  [FacebookLoginPlugin registerWithRegistrar:[registry registrarForPlugin:@"FacebookLoginPlugin"]];
  [FLTGoogleSignInPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTGoogleSignInPlugin"]];
  [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]];
  [FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]];
  [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
}

@end

" Launching lib/main.dart on iPhone XR in debug mode... Running pod install... Running Xcode build... Xcode build done. 9.6s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **

Xcode's output:
↳
    /Users/******/Documents/****/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_analytics/FirebaseAnalyticsPlugin.h' file not found
    #import <firebase_analytics/FirebaseAnalyticsPlugin.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone XR."

Upvotes: 4

Views: 8724

Answers (1)

Omatt
Omatt

Reputation: 10519

I'm currently using firebase_analytics: 6.0.0 and I didn't encounter any issues during my build on iOS. I've checked the GitHub thread you've shared and it looks like the issue has been solved by updating the plugin version. Another solution posted was to regenerate the pods by running flutter clean and running a build.

For other folks that still have this issue after doing the steps above, you can run flutter doctor -v to check for any errors and warnings and file an Issue here https://github.com/FirebaseExtended/flutterfire/issues

Upvotes: 0

Related Questions