how to slove 'Flutter/Flutter.h' file not found in xcode - ios

Flutter not found that type of error in Xcode for build application,I have try to schema in flutter but it could not build the app and Xcode could not build the IOS Application , so how can i Solve this i have already use flutter clean and flutter pub get to solve this but it could not build the app

Delete pods folder, .symlinks folder, Podfile.lock then navigate to ios folder. Run pod install. Then build from xcode. Make sure you have enough space on your machine to build it too

Related

I cant run my flutter project after updating to xcode 14... keep saying Unable to read project 'Runner.xcodeproj'

Unable to get Xcode project information:
2022-12-01 13:57:05.376 xcodebuild[71564:226197] Writing error result bundle to
/var/folders/6g/w7cqd0s54c33_20mrl4v2q640000gn/T/ResultBundle_2022-01-12_13-57-0005.xcresult
xcodebuild: error: Unable to read project 'Runner.xcodeproj'.
Reason: Project /Users/noel/Treegar/treegar-app/ios/Runner.xcodeproj cannot be opened because it is missing its
project.pbxproj file.
i keep getting this error when ever i run flutter run or flutter build ios.
i dont know what to do... it works fine on android but not on ios.
ive updated xcode and flutter same problem
flutter doctor -v
UPdate cocoapod to latest version
update flutter
update xcode
This error message indicates that the Runner.xcodeproj file is missing or cannot be opened.
This file is part of the Xcode project for your Flutter app and is necessary for building and running the app on iOS.
To fix this issue, try the following steps:
Make sure that you have the latest version of Xcode installed on
your computer. You can check for updates and download the latest
version of Xcode from the Mac App Store.
Make sure that you have the latest version of the Flutter SDK
installed on your computer. You can update Flutter by running the
flutter upgrade command in a terminal window.
Make sure that you have the latest version of CocoaPods installed on
your computer. You can update CocoaPods by running the
sudo gem
install -n /usr/local/bin cocoapods
command in a terminal window.
Make sure that you have a valid Xcode project file for your Flutter
app. If the Runner.xcodeproj file is missing, you can try running
the flutter create . command in the root directory of your Flutter
app to recreate the Xcode project files.
If the above steps do not help, you can try deleting the ios directory in your Flutter app and running the flutter create . command again to recreate the Xcode project files from scratch.
After trying these steps, try running the flutter run or flutter build ios command again to see if the issue has been resolved. If you continue to encounter errors, please provide more information about the specific steps you are taking and the full error message you are seeing.
try flutter clear and pubget.
or
try pod install
or
if it is not harmfull for your code try to delete ios folder and recreate it
in your project. may be this can work .

Flutter iOS app don't run for xcode simulator -how fix it?

I have flutter's app for iOS. It is working on device. but I cant run this on simulator. I have this error:
/Users/admin/StudioProjects/Cvetovik_app/ios/Runner/GeneratedPluginRegistrant.m:12:9: Module 'audio_session' not found
But I don't use this plugin audio_session. This is my architectures properties:
how do I fix this? I need to test the application on a simulator
First Open runner.xcworkspace not .xcodeproj
Hope its work for you
Try to reinstall Pod
Delete Pods folders and run
flutter clean
flutter pub get
in ios folder /
pod init
pod deintegrate
pod install

Flutter iOS run on simulator fails: Undefined symbol: _OBJC_CLASS_$_EAAccessory

I have upgraded my Flutter code to Flutter 2.5 and since then there is an error each time I try to run the app on simulator. It runs fine on the real device, but on simulator I find this error:
I checked the libraries I use and all are added in the Build Phases.
Any help?
On your terminal, go to project's folder and go to ios folder then you can delete the podfile.lock, Pods folder, .symlinks folder.
Then run flutter clean, flutter pub get, and run pod install --repo-update.
Then open the project on XCode and click SHIFT + CMD + K to clean the build folder.
After that try running again and let me know if works.

Unable to build flutter app with firebase auth in Xcode

I'm building a flutter mobile application with firebase_auth to authenticate. It's run well on android. But when i'm try to build it on ios using xcode it gives me series of erros.
I have added the GoogleService-info.plist file inside Runner folder using xcode and added the Firebase.configure() code potion in AppDeligate.swift file. But still not working for me.
Actually if you are develop your iOS app with Flutter you cant build in Xcode. You have to build with Flutter.
flutter clean
flutter build ios
Then
Xcode -> Product -> Destination -> Any iOS Device
Xcode-> Product -> Scheme -> choose scheme -> Runner
Xcode-> Product -> Archive
Or
flutter clean
flutter build ipa
then
Xcode-> Product -> Archive
Running in Xcode
First make sure to run pod install in the ios directory: cd ios; pod install
Then in Xcode, clean (Command + Shift + K) & rebuild (Command + B).
Running using flutter cli
Flutter CLI will make sure to run pod install for you. So it should work just by runnning flutter run or flutter build
Xcode errors almost never have singular answers
Add the GoogleService-info.plist file into your Xcode project by
right-clicking on any file inside the Runner folder within the file
Navigator pane (select add files to project and then add the
GoogleService-info.plist into the project). This process will make
sure that the Xcode project sees the file.
Make sure you enable the internet permission in the project.
You can install and use the pod deintegrate tool (src); with that tool you will be able to easily reset your Pod environment. A Google search can also give you others ways to reset the cocoapod environment. After which you'd want to pod install to ensure you get the latest versions of everything.
Make sure you address the pod warnings that usually appear. They might ask you to change your debug configuration to the Pods.debug reference for example.
flutter build ios will create any flutter specific files that might be missing so running this command in terminal from your project root folder is a great idea.
Another often missed opportunity is to just go into your root project and dump the (ios, macos, android, etc.) folder completely. Then use flutter create . from the project root folder to recreate the iOS folder before running flutter build then doing the normal sequence of getting Xcode ready.
In Xcode:
Open the workspace file not the Project file (we should see both
Runner and Pods in the screenshot provided and I don't see that in
yours)
Ensure that the project is signed
On the Runner project change the debug configurations to the Pods.
Add the Google info file into the iOS folder
Add the Google info file into the project workspace from within Xcode
NOTE:
I expect to see the Pods Project when you open the Runner.xcworkspace
file. If not, make sure you are opening the workspace file, close
Xcode and regenerate the pods from the iOS folder using pod install
or from the root folder run flutter build ios.

Why does xCode cannot build my flutter app with 'sqflite' not found error

I'm trying to build my Flutter app for iOS using xCode and got error:
.../ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'sqflite' not found
When I'm trying to build application with flutter with command
flutter build ios
I don't have any problem. Application build successfully.
I tried to delete Pod directory in ios folder and then install pods from scratch
flutter pub get
pod install
How to fix this problem with xCode?
XCode gives this type of Error like Module 'something' not found, when sometimes the problem is somewhere else.
So, what I did is after running flutter build ios command, I didn't try to run it in XCode. Because it was giving these errors.
So, I archived the app and tried to publish in App Store Connect. Then I found the real issue/bug on my code.
App store doesn't support transparent logo or app icon. This was the bug in my case.
So you can try to archive and publish to app store connect. It may show you the real reason.
Change your target Destination to > Any iOS Device
This work for me
"I found the solution,
In the existing project, once you guys add sqflite dependencies
Profile file in IOS folder will not generate code
we need to remove Podfile in ios
rm ios/Podfile
and run the project again, it works for me."
Credit:thanks to viroth-geek

Resources