Flutter will no longer build on iOS with Firebase - ios

new developer
I've been going through an online tutorial where when I get to the point I integrate Firebase my iOS emulator stops working. It does before, but not after. Additionally, there are no problems in my project according to flutter doctor and it even shows the iOS emulator as a connected device.
Things I have tried:
put GoogleService-Info.plist where it belongs
flutter clean
flutter update
pod init
pod update
I've recreated the project several times to this point and still can't get past this point
Xcode build done. 174.6s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ error: the following command failed with exit code 0 but produced no further output CompileC /Users/new/Library/Developer/Xcode/DerivedData/Runner-fvilcmacwsblvfgwjiawkhcwbfpe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Mantle.build/Objects-normal/x86_64/EXTRuntimeExtensions.o /Users/new/IdeaProjects/explornation07/ios/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler /Users/new/IdeaProjects/explornation07/ios/Pods/libwebp/src/enc/backward_references_enc.c:663:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized] (best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length; ^~~~~~~~~~~ /Users/new/IdeaProjects/explornation07/ios/Pods/libwebp/src/enc/backward_references_enc.c:595:20: note: initialize the variable 'best_offset' to silence this warning int best_offset; ^ = 0 1 warning generated. /Users/New/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.8/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:42:1: error: control may reach end of non-void function [-Werror,-Wreturn-type] } ^ 1 error generated. note: Using new build system note: Building targets in parallel note: Planning build note: Using build description from disk Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Could not build the application for the simulator. Error launching application on iPhone SE (2nd generation). Exited (sigterm)
My only thought is maybe if I use a different emulator, but it works up until emulator. I don't know.
If needed, I can try to restart the project again from scratch. Thanks!

please re-check your info.plist and your integration
if you checked everything is setup properly copy your lip and re integration your project and try again .. i think you misleading something
don't forget also check your packages versions
and try to rm your profile and re install
rm ios/Podfile

Related

Problems starting ios simulator with flutter

Hi I have the following error trying to debug an ios simulator with flutter. I used the flutter doctor command and also flutter doctor -v but it tells me there is no error. I also tried doing a flutter clean and then flutter run but the error persists. Has someone else happened to? Beforehand thank you very much!
lib/main.dart:1
Xcode build done. 36,1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Failed to package /Users/pedrocarrasco/Desktop/nuevo.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)

Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ba8188) and ?? (0x1145382b8). One of the two will be used. Which one is undefined

I'm running the flutter project on M1(Apple Silicon). This project is working in the Apple Intel and Windows. Please see my error messages while I got in the flutter run
Prasaths-MacBook-Pro:Foodom_ios prasathsivanathan$ flutter run
Launching lib/main.dart on iPhone 8 in debug mode...
Running Xcode build...
Xcode build done. 1.6s
Failed to build iOS app
Error output from Xcode build:
↳
objc[20641]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ba8188) and ??
(0x113e842b8). One of the two will be used. Which one is undefined.
objc[20641]: Class AMSupportURLSession is implemented in both ?? (0x204ba81d8) and ?? (0x113e84308). One of
the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthURLPresenter.m:24:
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.h:18:24: error: 'TARGET_OS_WATCHOS' is not defined, evaluates to 0
[-Werror,-Wundef-prefix=TARGET_OS_]
#if !TARGET_OS_OSX && !TARGET_OS_WATCHOS
^
1 error generated.
In file included from
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.m:23:
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.h:18:24: error: 'TARGET_OS_WATCHOS' is not defined, evaluates to 0
[-Werror,-Wundef-prefix=TARGET_OS_]
#if !TARGET_OS_OSX && !TARGET_OS_WATCHOS
^
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a
placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner'
from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 8.
I solved this issue yesterday;
Please check out your apple dev account on your xcode first, and run your project using xcode, and input your password, trust your certificate. After your xcode build success, you can run it on your idea (Android Studio) now.
I have same issue and resolved by accident.
Give it a try (not sure if this works)
flutter clean
rm ios/Podfile ios/Podfile.lock pubspec.lock
rm -rf ios/Pods ios/Runner.xcworkspace
Install Rosetta 2 on Your Mac M1 by executing this in terminal:
softwareupdate --install-rosetta
Select the app(terminal) in the Finder.
Right click on the app(terminal) and select Get Info.
In General, check the Open using Rosetta check-box.
Close the terminal Info.
Quit terminal and open it again.
Now in terminal write the following in front of your command:
arch -x86_64 [your command]
Credit: daniel.gindi gave a comment which allowed me to figure this out.

Flutter: 'grpcpp/support/byte_buffer.h' file not found

I have yesterday remove my project from my Mac and clone again from the repo. After that have I a problem with building of my Flutter app in the iOS Simulator.
I received fatal error: 'grpcpp/support/byte_buffer.h' file not found.
So I search on Google and tried this solution, but it doesn't works :-(
I don't know anymore what I should do, I hope that it's a little problem.
Please help me, thanks.
Launching lib/main.dart on iPhone 12 in debug mode...
lib/main.dart:1
Xcode build done. 8,8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Applications/MAMP/htdocs/capido/ios/Pods/FirebaseFirestore/Firestore/core/src/nanopb/writer.cc:17:
/Applications/MAMP/htdocs/capido/ios/Pods/FirebaseFirestore/Firestore/core/src/nanopb/writer.h:28:10: fatal error: 'grpcpp/support/byte_buffer.h' file not found
#include "grpcpp/support/byte_buffer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)
Found the solution that worked for me and which is probably a reason why creating a new user account in OS X worked for #BNetz.
The problem is that CocoaPods cache is somehow corrupted and everytime you execute pod install pods are fetched from this cache.
Easy way to clear the cache is to delete CocoaPods cache folder located here $HOME/Library/Caches/CocoaPods. This way you force CocoaPods to download correct version of pods by executing pod install in your project location.

Could not find an option named "DartDefines"

When I open up an IOS simulator to launch my flutter apps, it fails. Before it used to work fine. I get the following error:
Xcode build done. 122.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Could not find an option named "DartDefines".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.
Exited (sigterm)
I tried the following
Getting error when launching flutter apps in simulators.
I have the same issue, and I've fixed it by running two command.
Please try, hope it help.
flutter channel dev
flutter upgrade
Good luck!

Xcode error : while executing 'flutter run' command

When I run the command
flutter run
for my app, it gives the following error :
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
Running Xcode build...
Xcode build done. 7.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/Soumya/Desktop/fluttershare/build/ios/Debug-iphonesimulator/gRPC-C++/gRPCCertificates.bundle: replacing existing signature
/Users/Soumya/Desktop/fluttershare/build/ios/Debug-iphonesimulator/gRPC-C++/gRPCCertificates.bundle: resource fork, Finder
information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To
resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone SE (2nd generation).
What could be the possible reason behind this and how one can solve this issue ?
Clean your build and rebuild the app that should solve the issue.
flutter clean

Resources