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

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 .

Related

Not able to build and run any flutter app on iOS simulator using the command flutter run

Error occurring:-
pubspec.yaml file:-
Podfile:-
Below are solutions I tried but still the app don't build on iOS Simulator on MAC m1.
Tried running pod init and pod install in iOS directory.
Tried running flutter clean and flutter pub get.
Tried re-installing the CocoaPods.
Tried updating the Xcode command line tools.
Tried deleting and again downloading the common line tools.
Tried updating the Xcode to latest version

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

Not able to build for IOS after flutter upgrade to 1.20.2

I am facing the issue after upgrading to stable flutter version 1.20.2. I am not able to run on IOS. when I start debugging I get this error.
Xcode build done. 48.6s
Failed to build iOS app
Exited (sigterm)
Could not build the application for the simulator.
flutter run -v
Before that, I was on flutter 1.17.5 and everything was working. It is happening on all of my projects. How to resolve?
It happens to me also after Upgrading flutter, My project does not work.Then i create new project and copy paste previous code in new projects.This works for me because previous projects have old dependencies.Try it

Flutter iOS - Run script : xcode_backend.sh Operation not permitted

I'm trying to build any Flutter app on iOS on a new Macbook pro 16"
My project used to work well, then after some flutter upgrade, i can't build any project with Xcode
Problem:
/bin/sh:
/Users/{MyUserName}/Documents/dev/utils/flutter/packages/flutter_tools/bin/xcode_backend.sh:
Operation not permitted Command PhaseScriptExecution failed with a
nonzero exit code
What i tried:
Upgrading Xcode & Command line tools
chmod -R 755 my project, and the flutter lib
Follow the Flutter tutorial to use flutter with the latest version of xcode
Switching flutter channel (tried stable 1.17 & master 1.19)
Delete Xcode (& dependencies) delete Flutter & reinstall both
Now, when i try to create a new flutter project
I always face the issue.
The builds are working when i use flutter run from CLI (on my device)
But if i try to use the project with xcode & try to build or run, i face the issue above.
I cant really find similar issues on the web.
PS: My project are working on my old macbook pro 13" same version of xcode and Flutter
Found the answer:
The problem was that Xcode App didn't have enough rights to read / write files & folders.
To solve it:
Go to System preferences > Security & Privacy
Last tab: Privacy
Full disk access: Add Xcode App
If you dont want Xcode to have full disk access you can add it in "Files and folders" instead, and give Xcode rights to your projects folder

Swift and Firebase Project Runs on simulator Error on an actual Device

I'm developing an iOS App using Firebase SDK, The app runs perfectly on the simulator, but when I try to run it on an actual device I'm getting an error like this
Also when I'm trying to archive it. I forgot to tell that I used cocoapods to install Firebase SDK. Thanks!
I had this error because the xcode version.
I have created the project using the xcode beta version, then i updated it and got this error.
hours later, when I gave up trying to resolve this error, when trying to install another pod, this error occurred:
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in git_version': Failed to extract git version fromgit --version("xcrun: error: active developer path (\"/Applications/Xcode-beta.app/Contents/Developer\") does not exist\nUsesudo xcode-select --switch path/to/Xcode.appto specify the Xcode that you wish to use for command line developer tools, or usexcode-select --installto install the standalone command line developer tools.\nSeeman xcode-select` for more details.\n") (RuntimeError) ...
when trying to run the
pod-install command
Then I ran the sudo
xcode-select command --switch path / to / Xcode.app
which was prompted for the error, and the Firebase-related error was miraculously fixed. Hope it could helps someone.

Resources