GoogleUtilities/GULSceneDelegateSwizzler.h file not found - ios

Unable to build Flutter app on iOS/Xcode
Pubspec file with used dependencies
Already tried all the pod install/upgrade, flutter clean, pub install etc solutions.
Error message looks like this:
ios/Pods/FirebaseAuth/Firebase/Auth/Source/Auth/FIRAuth.m:32:9: fatal error:
'GoogleUtilities/GULSceneDelegateSwizzler.h' file not found
#import <GoogleUtilities/GULSceneDelegateSwizzler.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ios/Pods/FirebaseAuth/Firebase/Auth/Source/Auth/FIRAuth.m:32:9: note: did not find header
'GULSceneDelegateSwizzler.h' in framework 'GoogleUtilities' (loaded from 'build/ios/Debug-iphonesimulator/GoogleUtilities')
1 error generated.
Would be very grateful for any input on this issue.

Update pods from Terminal:
pod update
That should resolve your problem.
ps. backup your app before update

Move into iOS directory (in your flutter project) and update pod
cd ios
pod update
cd..
flutter clean

Related

Build fails on adding pod 'Firebase/AppCheck' to the Podfile

I'm using firebase_app_check package. All good. The following command works as expected.
flutter build ios
But as soon as I add the following in the Podfile(ios)
pod 'Firebase/AppCheck'
iOS build fails with this error:
Definition of 'GULAppEnvironmentUtil' must be imported from module 'GoogleUtilities.GULAppEnvironmentUtil' before it is required
What am I missing?
Try to run following command it may help you
run flutter clean
run flutter pub get
go to your project iOS directory and run pod install then run pod update
if this issue is because of outdated pod files

Flutter fatal error: 'Flutter/Flutter.h' file not found

I am unable to build flutter project for iOS , gives me error as follows
Xcode's output:
↳
In file included from /Users/sulfy/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.5/ios/Classes/FLTPathProviderPlugin.m:5:
/Users/sulfy/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.5/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
tried
pod deintegrate
rm ios/Flutter/Flutter.podspec
flutter clean
flutter pub get
pod install
Clean derive data
flutter run
and still same, I am unable to get rid of this error.
I even tried removing path provider plugin from pubsec.yaml
Any help will be high appreciated as I'm stuck on this over 24 hours
Try Raffaelli L.C. answer:
Backup ios/Runner folder.
Delete the ios folder.
Run flutter create (your project name). in the previous folder where you have your project(cd users/user/"projects_folder")
(this will recreate your ios folder).
Paste your Runner backup in the ios folder (into the project).
Open Runner.xcworkspace (into ios folder) and there, check the Version, the Bundle ID, all the info.
(If do you Have Firebase, you have to copy and paste again the Google Service-Info.Plist into the Runner folder (Always through Xcode) (If do you do this manually, it doesn't work).
Finally, flutter run and should work!
If flutter run fails:
cd ios
pod install
cd ..
flutter run

fatal error: 'openssl/x509.h' file not found in Flutter iOS build after integrating firestore

My Flutter app was integrated with Firebase and the app was building successfully with Firebase core and auth. However when I added the cloud_firestore: ^2.2.0 dependency, the build fails on iOS (still works on Android) with the following error message:
In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:35:
In file included from /Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/security_connector.h:33:
/Users/charismak/AndroidStudioProjects/foodstack/ios/Pods/gRPC-Core/src/core/tsi/ssl_transport_security.h:28:10: fatal error: 'openssl/x509.h' file not found
#include <openssl/x509.h>
^~~~~~~~~~~~~~~~
1 error generated.
When I remove the dependency, it builds successfully.
I have tried running pod install, flutter clean, changing the deployment target on Xcode and podfile, and installing/upgrading openssl.
It is the same issue as this: Not found 'openssl/x509.h' when install cloud_firesore flutter?
I solved it by running the following commands in terminal inside <your_project_path>/ios:
rm -rf Pods Podfile.lock
pod cache clean --all
pod install
(Installation may take some time to complete)
Source: https://github.com/FirebaseExtended/flutterfire/issues/3203#issuecomment-743789416

Module 'firebase_analytics' not found

I have a problem,
I tried to publish a new version of my app on the apple store and it gave this problem:
Module 'firebase_analytics' not found
Has anyone ever experienced this?
Module 'firebase_analytics' not found
First of all, make sure you add analytics to your podfile.
target 'Runner' do
pod 'Firebase/Analytics'
end
The other thing is to go to the ios directory and execute the command.
pod clean
pod install
Finally you could run the following commands in the root directory.
flutter clean
flutter pub get

flutter_blue^0.6.3 file not found #import "google/protobuf/Any.pbobjc.h" Flutter

When I add flutter_blue: ^0.6.3 to my brand new project dependencies, I get the following error:
Xcode build done. 6.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'protobuf' imported from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBArray.h:33:
In file included from <module-includes>:1:
In file included from /Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h:28:
In file included from /Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:44:
/Users/johanalbrectsen/AndroidStudioProjects/flutter_blue_test/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:44:10: fatal error: 'google/protobuf/Any.pbobjc.h' file not found
#import "google/protobuf/Any.pbobjc.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/Classes/FlutterBluePlugin.m:6:
In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/Flutterblue.pbobjc.h:13:
In file included from /Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBProtocolBuffers.h:33:
/Users/johanalbrectsen/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3/ios/gen/GPBArray.h:33:9: fatal error: could not build module 'protobuf'
#import "GPBRuntimeTypes.h"
~~~~~~~^~~~~~~~~~~~~~~~~~~
2 errors generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Do you have any idea how to fix this?
I had same problem and downgrading cocoapods to 1.7.5 worked for me.
Try with:
flutter clean
Delete Pod folder and Podfile.lock file inside the ios directory of your project
pod install
pod upgrade and then
flutter run on root directory of your project
this issue is discussed all over,
please check this answer on github
Yep, if someone encounter the same issue later, just like #Ritz_04 said, you just have to do downgrade cocoapods to 1.7.5 by doing :
sudo gem uninstall cocoapods --all
sudo gem install cocoapods -v 1.7.5
Then go into your Flutter project and then into the ios folder and do :
rm -rf ./Pods
rm ./Podfile.lock
pod install --repo-update
And you should be ready to go!

Resources