Flutter xcode build error File name too long - ios

I tried to build my flutter app in xcode and I got the following error - "File name too long".
I build at command line -
flutter clean
flutter pud get
go into ios folder and run pod install
flutter built ios -v
build is successful and no error found in verbose log. May I know what could be the issue.
/Users/username/Library/Developer/Xcode/DerivedData/Runner- ehbtgfrwszowthgqyvfzuynymnrk/Build/Products/Debug-iphoneos/Runner.app: File name too long
Command CodeSign failed with a nonzero exit code

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)

Xcode build fail on m1 chip

I'm trying to build a flutter app in Xcode on my Mac (m1 chip). But it fails due to below error.
Command PhaseScriptExecution failed with a nonzero exit code
As the warning says, my guess is that the issue occur while it trying to build it for arm64. But I have already add aram64 in excluded arch list.
I'm running Xcode on rosetta & also its build successfully on iOS 12 & iOS 14 simulators but the issue comes when I try to build it on real device with iOS 14.3 and also in archive build. What I'm doing wrong here?
Command PhaseScriptExecution failed with a nonzero exit code
The error you've encountered could be due to many reasons. It would be better if you can isolate the issue by performing the workaround that was discussed in this GitHub post.
Sent here from:
#76302
So I was having this issue after trying every flutter clean / podfile
delete sequence under the sun. Turns out my flutter got stuck at an
old version that is evidently not compatible with the latest version
of xcode or something (who really knows).
So I had to run
flutter upgrade --force
flutter clean
delete Podfile and Podfile.lock
run pub get
re-run my build_runner stuff (you may not have this)
flutter run (to run the app on device with all this new stuff / regenerate podfile stuff)
Then I was finally able to get my ios archive to build with flutter build ipa.
FYI: The flutter upgrade command pushed me from 2.0.5 -> 2.2.1 on
the stable channel. Prior to this, I was just getting generic warnings
of Command PhaseScriptExecution failed with a nonzero exit code.

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

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

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.

React-Native error: Command PhaseScriptExecution failed with a nonzero exit code

I have recently started with React-Native and wanted to try a bluetooth connectivity library (https://github.com/innoveit/react-native-ble-manager)
Steps to create app and run on device:
react-native init myBluetoothHandler
cd myBluetoothHandler
npm i --save react-native-ble-manager
When I do this I see this log:
react-native link react-native-ble-manager
Which fails with this error log:
Just for a hit and try I ran step 3 again and this printed. And after that link command also worked.:
But I am not able to run the project from Xcode on my device. I see this error:
Same happened to me when I tried a different library: https://github.com/Polidea/react-native-ble-plx/issues/388
Use react-native init <project_name> --version 0.59.0. Do not use rc versions.

Resources