Closed DarkKnight1005 closed 2 years ago
The issue can be resolved if in
GeneratedPluginRegistrant.m
the 3rd line of the following block:
You can't edit the file since it's autogenerated. Whatever changes you'll make, it will be reset during build run.
Can you try:
pod cache clean βall
flutter clean
flutter pub get
pod install
The issue can be resolved if in
GeneratedPluginRegistrant.m
the 3rd line of the following block:You can't edit the file since it's autogenerated. Whatever changes you'll make, it will be reset during build run.
Can you try:
pod cache clean βall flutter clean flutter pub get pod install
Did it several times, not working. Also did
pod deintegrate
not woking.
@DarkKnight1005
It could be a conflict with 3rd party plugins with the podfile. I tried a sample app with firebase_core on iphone simulator using latest stable and it worked properly as expected. Maybe you can try to delete podfile.lock and then podfile and regenerate it using pod install
, pod repo update
and then flutter run
.
Thanks.
@DarkKnight1005 It could be a conflict with 3rd party plugins with the podfile. I tried a sample app with firebase_core on iphone simulator using latest stable and it worked properly as expected. Maybe you can try to delete podfile.lock and then podfile and regenerate it using
pod install
,pod repo update
and thenflutter run
.Thanks.
Thanks, for the reply, although I did everything you mentioned unfortunately this is not working. What exactly can cause ta problem? Which 3rd party plugins may malfunction the work of firebase?
Thanks in advance.
@DarkKnight1005 I tried sample code using the plugins you are using and ran it properly. Can you try to create a new project, copy over all the plugins and podfile and run it to if that also gives you same error or not ?
@DarkKnight1005 I tried sample code using the plugins you are using and ran it properly. Can you try to create a new project, copy over all the plugins and podfile and run it to if that also gives you same error or not ?
I Created a new project, copied and pasted all the stuff in info.plist
,podfile
and pubspec.yaml
. And again I have the same issue.
Here is output:
Xcode's output:
β³
FirebaseAnalytics-djjomtodwlzjdhekzzoluegsmtfp
While building module 'firebase_core' imported from /Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/ios/Runner/GeneratedPluginRegistrant.m:22:
In file included from <module-includes>:1:
In file included from /Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/firebase_core-umbrella.h:13:
In file included from /Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/FLTFirebaseCorePlugin.h:11:
/Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/build/ios/Debug-iphoneos/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import "FirebaseCore.h"
^
1 error generated.
/Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/ios/Runner/GeneratedPluginRegistrant.m:22:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebaseCorePlugin.h>
~~~~~~~^
2 errors generated.
FirebaseAnalytics-djjomtodwlzjdhekzzoluegsmtfp
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'OrderedSet' from project 'Pods')
/Users/ayazpanahov/Desktop/FlutterProjects/AIH/cap_mobile_flutter/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Toast' from project 'Pods')
Could not build the precompiled application for the device.
Error launching application on iPad 11 Pro M1 AIH.
Exited (sigterm)
Keeping it open for further insights from the team on this, as there have been similar reported issues in the past:
https://github.com/FirebaseExtended/flutterfire/issues/5284 https://github.com/FirebaseExtended/flutterfire/issues/7175
There are some problems with Flutter 2.5.x. Downgrading to v2.2.0 fixed the problem.
Solution: downgrade to v2.2.0
Dear FlutterFire team, please fix the problem with Flutter + Firebase on version 2.5.x.
Experiencing the same issue. Downgrading to Flutter v2.2.0 did not solve the problem. Xcode output:
Xcode's output:
β³
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
Command CompileSwiftSources failed with a nonzero exit code
While building module 'firebase_core' imported from /Users/daniel/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.3.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:
In file included from <module-includes>:1:
In file included from /Users/daniel/projects/baseflow/hypex_molamola_app/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
In file included from /Users/daniel/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.10.0/ios/Classes/FLTFirebaseCorePlugin.h:12:
/Users/daniel/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.10.0/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin':
'/Users/daniel/projects/baseflow/hypex_molamola_app/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
In file included from /Users/daniel/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.3.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:
/Users/daniel/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.3.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePlugin.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
Encountered error while building for device.
Flutter doctor output (not using this machine for Android):
[β] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64, locale nl-NL)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
β cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
β Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[β] Xcode - develop for iOS and macOS
[β] Chrome - develop for the web
[β] Android Studio (version 4.1)
[β] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
[β] Connected device (1 available)
! Doctor found issues in 1 category.
pubspec.yml:
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter_svg: ^0.23.0+1
equatable: ^2.0.3
flutter_reactive_ble: ^4.0.0
fluro: ^2.0.3
pull_to_refresh_notification: ^2.2.0
dotted_border: ^2.0.0+1
permission_handler: ^8.0.0
firebase_core: ^1.10.0
firebase_crashlytics: ^2.3.0
flutter_bloc: ^7.3.1
fluttertoast: ^8.0.8
shared_preferences: ^2.0.0
rxdart: ^0.27.2
tuple: ^2.0.0
package_info: ^2.0.2
path_provider: ^2.0.0
connectivity: ^3.0.6
quiver: ^3.0.1+1
dio: ^4.0.1
ini: ^2.1.0
url_launcher: ^6.0.0
wakelock: ^0.5.6
flutter:
sdk: flutter
cupertino_icons: ^1.0.3
flutter_cached_pdfview: ^0.4.0-nullsafety
flutter_pdfview: ^1.2.1
dev_dependencies:
flutter_test:
sdk: flutter
# Plugin which helps generating launch icons
flutter_launcher_icons: ^0.9.2
When creating a new project, with the same dependencies, I'm getting te following output:
Xcode's output:
β³
/Users/daniel/projects/test/firebase_core_issue_test/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'firebase_core' not found
@import firebase_core;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
What worked for me is using the precompiled version for the Firestore iOS SDK as something went wrong during compilation. See 'Improve iOS Build Times' section at https://firebase.flutter.dev/docs/overview/#initializing-flutterfire
See this answer on StackOverflow: https://stackoverflow.com/questions/69813789/flutter-ios-how-to-fix-could-not-build-module-firebase-core/69943297#69943297
Having same issue and trying all steps and comments... not working..
I am experience the same issue ever since I upgraded to the new flutter version and the new firebase_core process. Project that was working fine ceased to be able to build. I have tried a clean project and then downloading my code, same issue. I am running on the M1 processor and have tried multiple fixes including arch -x86_64 pod install and the suggested items from Milan above. None have worked.
Failed to build iOS app Error output from Xcode build: β³ objc[2138]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1216b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1044682c8). One of the two will be used. Which one is undefined. objc[2138]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1216be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104468318). One of the two will be used. Which one is undefined. BUILD FAILED
Xcode's output: β³ /Users/geoffnelson/Documents/code/flutter/baseuserauth/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'firebase_auth' not found @import firebase_auth;
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/geoffnelson/Documents/code/flutter/baseuserauth/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 15.2.99. (in target 'AppAuth' from project 'Pods')
/Users/geoffnelson/Documents/code/flutter/baseuserauth/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 15.2.99. (in target 'GoogleSignIn' from project 'Pods')
I downgraded flutter to 2.5.3 and was then able to build my application. This is not resolved but at least I have a path to work on this existing project.
I've just ran on Flutter stable channel latest 2.8.1
targeting iOS 10 and had no problems. Can anyone else confirm it works on latest?
My issue looks to be resolved after upgrading. Was able to successfully run my project.
I am facing the same issue. I have done everything.
pod deintegrate pod upgrate pod install flutter update flutter clean
I am using flutter 2.8.1. I have updated all the package. But I am still getting firebase_core issue.
/Users/user/Documents/Projects/LENTHO-Frontend/ios/Runner/GeneratedPluginRegistrant.m:16:9: Could not build module 'firebase_core'
Anyone has found a solution for this?
Upgrading to 2.8.1 worked to resolve my issue. I am also running firebase_core version 1.10.6. However, I did downgrade flutter to 2.5.3 and this resolved my issue so that I could continue to work before 2.8.1. You could try that and see if resolves your problem. Pretty straight forward process documented here https://stackoverflow.com/questions/49468321/how-to-downgrade-flutter-sdk-dart-1-x. There was also an issue with xcode 13.2 and you should make sure you are on 13.2.1. Not sure if that was an issue though. Hope this helps or points you in a better direction.
@geoffn Yeah. I am using 13.2 Xcode. For me 2.8.1 is not working. I created a new project and checked. But I got the same issue. What can be the problem?
@sabbir-riseuplabs can you run the following and check if the problem still persists?
flutter pub cache repair
I have this issue as well today and resolved by referring to the solution mentioned in https://github.com/FirebaseExtended/flutterfire/issues/3272#issuecomment-696070834
The steps I take
5* . Run pod cache clean βall
in terminal
6.Run flutter clean
in terminal
flutter pub get
in terminalpod install
in terminalPlease note, step 5 is mentioned in the referred solution but I actually did not run it.
I am using
firebase_core: ^1.11.0 firebase_crashlytics: ^2.4.5
Xcode version is 13.2.1
Given the lack of traffic on this issue and the fact it has been resolved, I'm going to close this issue out. If you are still experiencing this problem, it is almost certainly a caching issue. I would refer you to follow the advice set out in the above comment by @benedict1986 to help clear all build cache.
Error after first firebase integration:
The issue can be resolved if in
GeneratedPluginRegistrant.m
the 3rd line of the following block:will be changed to
However, editing the
GeneratedPluginRegistrant.m
is only possible if building purely with XCode, when building with flutter byflutter run
command, then the previous file being overwritten by flutter and build error occurring again.Expected behavior: A successful build for the iOS simulator
All Flutter Packages:
Podfile:
Flutter doctor: