flutter xcode build failed fatal error: module 'connectivity' not found - ios

I am trying to run my little old project. I updating all the plugins and code issues are solved. but now if I run flutter run I get the bellow error
Xcode build done. 16.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/mdzainalabedin/padelmatchv2/ios/Runner/GeneratedPluginRegistrant.m:10
:9: fatal error: module 'connectivity' not found
#import connectivity;
~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.

After wasting so many times, I found only following command in terminal under Project directory folder is worked for me
rm ios/Podfile && flutter build ios

Related

flutter build ios --release fatal error: module 'add_2_calendar' not found

I want to make a release for my project who work perefctly in dev mode.
When I make only flutter ios build it works fine
but flutter build ios --release doesn't work
the error message
youssefdahar#MacBook-Pro-van-Youssef devs % flutter build ios --release
Building com.example.mental for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: X6BX32XBYP
Running pod install... 1 022ms
Running Xcode build...
└─Compiling, linking and signing... 1 163ms
Xcode build done. 47,6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/n7/4j0kgb856bl9z75hy71rfmj80000gn/T/flutter_tools.TVo200/flutter_ios_build_temp_dirNtfcgE/temporary_xcresult_bundle
/Users/youssefdahar/devs/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'add_2_calendar' not found
#import add_2_calendar;
~~~~~~~^~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/n7/4j0kgb856bl9z75hy71rfmj80000gn/T/flutter_tools.TVo200/flutter_ios_build_temp_dirNtfcgE/temporary_xcresult_bundle
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Encountered error while building for device.
I saw in the in the internet that i have to clean project and pod folder and file and reinstall, i tried many times but in vain
thanks in advance for your help
Finally I figured out that pod init and install doesn't work correctly because the file podfile generate by pod init is not the same as podfile generated by flutter run.
The solution is I deleted all pod file and folder and lock and ran flutter run once

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)

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.

React Native iOS build failed due to Yoga Error

I ejected from expo to pure react native project. IOS project is not running as expected. The error i got was
~/ReactCommon/yoga/yoga/YGEnums.h: No such file or directory
More error is show below
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening TrackUs.xcodeproj
** BUILD FAILED ** The following build commands failed:
PBXCp /Users/user/ReactCommon/yoga/yoga/YGConfig.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGConfig.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGValue.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGValue.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGMarker.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGMarker.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGEnums.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGEnums.h (4 failures)
Is there anything I did wrong? It seem not to see the YOGA file or path.
Try deleting the build folder <your-project>/ios/build and then run react-native run-ios again.

Can't build for release - Flutter, Xcode

I have built a couple of Flutter apps using IntelliJ and xcode on a Mac server to build for ios release, and it has worked fine. Now I am suddenly having troubles building for release.
To test to see if it was something in my app, I just started a new app from scratch in IntelliJ on the server, configured the framework (including directing to the flutter install), and tested it out.
It builds and runs on the simulator just fine. But when I try to build for release ("flutter build ios" from command line) I get an error, which I will paste at the end of this message.
I have been trying for some time to figure out why I am getting the errors when building my app. Now even the default app seems broken.
Does the problem have something to do with the server?
Thank you.
The error message that I get when building for release (I gave the project a silly name, added an icon, and gave the app a build and version number, but otherwise it is an untouched flutter default app):
74-80-250-218:untitled userxxxxx$ flutter build ios
Building com.burrito.untitled for device (ios-release)...
Automatically signing iOS for device deployment using specified development team
in Xcode project: xxxxxxxxxx
Running Xcode build...
├─Building Dart code... 22.7s
├─Generating dSYM file... 0.2s
├─Stripping debug symbols... 0.0s
├─Assembling Flutter resources... 1.2s
└─Compiling, linking and signing... 0.2s
Xcode build done. 26.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/userxxxxxx/Desktop/untitled/ios/Runner/GeneratedPluginRegistrant.m:5:
/Users/userxxxxxx/Desktop/untitled/ios/Runner/GeneratedPluginRegistrant.h:8:
9: fatal error: 'Flutter/Flutter.h' file not found
#import
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from
/Users/userxxxxx/Desktop/untitled/ios/Runner/GeneratedPluginRegistrant.m:5:
/Users/userxxxxxx/Desktop/untitled/ios/Runner/GeneratedPluginRegistrant.h:8:
9: fatal error: 'Flutter/Flutter.h' file not found
#import
^~~~~~~~~~~~~~~~~~~
1 error generated.
Encountered error while building for device.
You could try deleting the ios folder on the project and generate an iOS build again by running flutter create --platforms=ios [PROJECT_PATH]. That should generate an iOS project from your Flutter code. After that, run flutter build ios again.

Resources