Flutter App can't run on IoS simulator with cycle inside runner, and domain=NSPOSIXErrorDomain, code=63 - ios

I am having problems since the IoS 14 update. At first it was the deployment target 8.0 and it could temporalily fixed by updating GoogleInfoPlist every time I pulled from our repo in Git. but after a while this temporary fix doesn't work anymore. I got header problem for my FlutterFire plugins.
warning: double-quoted include "FLTFirebaseCorePlugin.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header]
#import "FLTFirebaseCorePlugin.h"
^~~~~~~~~~~~~~~~~~~~~~~~~
<firebase_core/FLTFirebaseCorePlugin.h>
I have updated my deprecated Firebase core,auth and firestore plugin to the newest one with the help of the flutterfire migration guide. after that the firebase plugin problem was fixed. but i still got problems with 2 plugins: Google Maps Flutter and Image Picker. Waht i did to fix the problem was updating Cocoapods to the beta version for the Google Maps plugin but ther was still a problem with the image picker for the moment i deleted the plugin form my app.
After that i got 3 errors. the first one is the CodeSign cycle inside Runner Error :
error: Cycle inside Runner; building could produce unreliable results.Target 'Runner': CodeSign /Users/user/StudioProjects/app/build/ios/Debug-iphonesimulator/Runner.app
○ Target 'Runner' has copy command from '/Users/vaisatriani/StudioProjects/kuliner_11_app/build/ios/Debug-iphonesimulator/Runner.app' to
I searched for a fix and i found that flutter clean can fix that error. The error did go away but one new error popped out :
error: '/Users/Username/StudioProjects/appname/build/ios/Debug-iphonesimulator/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/GoogleService-Info.plist' is longer than filepath buffer size (1025). (in target 'Runner' from project 'Runner')
And i somehow fixed it by removing Runner as Target from Product in XCode. but now i'm stuck with this one error.
Unable to install /Users/user/StudioProjects/app/build/ios/iphonesimulator/Runner.app on FFF556AF-19DB-4B7B-93BF-A67EE0EA8621. This is sometimes caused by a malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=63):
copyfile of file:///Users/user/StudioProjects/app/build/ios/iphonesimulator/Runner.app/ to file:///Users/user/Library/Developer/CoreSimulator/Devices/FFF556AF-19DB-4B7B-93BF-A67EE0EA8621/data/Containers/Shared/SystemGroup/systemgroup.com.apple.installcoordinationd/Library/InstallCoordination/PromiseStaging/EF2DB4B2-5512-4C14-BCA3-FA7667170000/Runner.app failed: File name too long
Unhandled error domain NSPOSIXErrorDomain, code 63
Command: /usr/bin/xcrun simctl install FFF556AF-19DB-4B7B-93BF-A67EE0EA8621 /Users/user/StudioProjects/app/build/ios/iphonesimulator/Runner.app
I couldn't fix it by deleting Derived Data. Does somebody knows how to fix this?? i'm stuck with this problem for a while now. Any help would be appreciated. Thank you so much.

Found a fix for this error. what i did was to reset the simulator (Device -> Erase All Content and Settings), and then run $ flutter clean after that rebuild your app.

delete → Runner.xcworkspace → xcuserdata folder
delete → Pods folder on inside ios folder
delete → ios → flutter → Flutter.podspec
run flutter clean
flutter run

Related

Error (Xcode): 'Flutter/Flutter.h' file not found

Spent an hour trying to debug this error with stack overflow and GitHub. Any help appreciated. I tried the deleting iOS file and doing flutter clean and stuff.
Error (Xcode): 'Flutter/Flutter.h' file not found
/Users/ME/Desktop/fitnessapp/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/ME/Library/Developer/Xcode/DerivedData/Runner-gzhzlsjpfyzcnebymqrpzjndrlbm/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift
_10LJ9PKPTMFQI-clang_1OUD1W5Q54EHI.pch' for bridging header'/Users/ME/Desktop/fitnessapp/ios/Runner/Runner-Bridging-Header.h'
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
You could try to do this:
Backup Runner folder
Delete the ios folder
Go to a terminal and execute flutter create . in the flutter project folder
Paste your Runner folder back into the ios folder
pod deintegrate in the ios folder
pod install also in the ios folder
flutter clean in the flutter project folder
flutter pub get
flutter run
Please note that if you use firebase you need to re-insert the GoogleService-Info.plist file
Hope it helps, but if it still does not make sure you are in stable channel
After trying Edin's solution it still didn't work for me!
Make sure that for install builds only box is unchecked
for install builds only is unchecked

Xcode gRPC-Core Error: 'openssl_grpc/ssl.h' file not found

Xcode: 11.2.1
Mac: 10.15.2 Beta
Pod version: 1.8.4
I was trying to Archive my Mac app on Xcode, then below error in my Xcode:
I can compile my app without a problem, just can't archive, I am thinking the issue might be I need to update my pod, when I run command in my terminal
pod outdated
it shows below info:
so this is just my guessing.
Here is an update:
After tried Paul's suggestions, I got a different error:
From https://github.com/grpc/grpc/issues/20500#issuecomment-543241775:
Archive the project in Xcode. It fails with error "openssl_grpc/xxx.h
file not found".
In the issue navigator, find the particular error,
right click, click "Reveal in Log"
In the build log that's showing
the error, there's a parentheses with words loaded from
'/Users/xxx/Library/Developer/Xcode/DerivedData/....'.
Copy the full
path and append it with /openssl_grpc.framework for use in the next
step; should look something like
/Users/xxx/Library/Developer/Xcode/DerivedData/......../BoringSSL-GRPC/openssl_grpc.framework
Archive the project again. When Xcode shows it's building
"BoringSSL-GRPC", go to terminal, cd into the directory in the above
step, then run command ln -s Versions/Current/Headers Headers. This
needs to be done before Xcode finishes building "BoringSSL-GRPC".
Expect the file-not-found error not showing up this time.

Can't archive with Xcode (error - PhaseScriptExecution failed with a non zero exit code), but the build is successful

I am sorry for the black marks in the image.
I have seen multiple posts suggesting an answer to this problem, Lock unlocks keychain (tried it), pod Update (tried it), clear build(tried it), signing, skip install in build settings(tried it) - None of them actually worked.
I built my iOS app in react native with Expo, after which I did expo eject to create the iOS folder for Xcode build and archiving, the build is successful every time and it even runs on the simulator and in my device(iPhone 7) but it always failed to archive by throwing this error - Uncategorised - Command PhaseScriptExecution failed with a non zero exit code..
Any help to point me in which direction should I go or what can be the possible mistake that I am doing will be of great help. Do let me know if, I should provide any more detail about this. Thank you!
Xcode Version - 11.0
Mac Version - 10.15 Catalina
iPhone OS - 13.1.3
Few links I tried from -
"${PODS_ROOT}/SwiftLint/swiftlint" causes "Command PhaseScriptExecution failed with a nonzero exit code" with Xcode 10
https://github.com/apollographql/apollo-ios/issues/395
https://www.reddit.com/r/iOSProgramming/comments/al9box/getting_an_error_command_phasescriptexecution/
Make sure you have installed your pods correctly. For me I removed all the pods from my pod file, updated the pod through the terminal, then re-added the pods to the pod file and installed through the terminal. This worked perfectly for me.
I had the same exact problem. What worked for me was I opened the podifle and deleted all the pods, then saved it. After that run pod update in terminal. Go back to the podfile and past the pods back into the file and save it. Then run pod update in terminal again. After that open xcode and run the cleaner and then try to Archive...it worked for me.
Based on the previous answers, the following worked for me:
Quit XCode.
Delete all relevant files: Podfile, Podfile.lok, Pods folder and .workspace file.
Recreate the Podfile and open the new .workspace file.
Cheers
PS: In my case, I hit this issue after copying an existing project (workspace) to a new machine.
Try go to accounts and press download manual profilesenter image description here

Flutter - <Flutter/Flutter.h> not found when using the google_sign_in library

I am facing this issue while compiling the app for ios
this is the whole stacktrace:
Launching lib/main.dart on iPhone Xs Max in debug mode... Running pod
install... Running Xcode build... Xcode build done.
2,4s Failed to build iOS app Error output from Xcode build: ↳
** BUILD FAILED **
Xcode's output: ↳
=== BUILD TARGET FirebaseAuth OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from /Users/danielec/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.1+3/ios/Classes/GoogleSignInPlugin.m:5:
/Users/danielec/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.1+3/ios/Classes/GoogleSignInPlugin.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import
^~~~~~~~~~~~~~~~~~~
1 error generated.
I tried reinstalling both firebase_auth and google_sign_in, removing and reinstalling cocoapods, I don't know what else to do, as any one experienced this problem before?
Versions:
Cocoapods: 1.6.1
firebase_auth: ^0.8.4+5
google_sign_in: ^4.0.1+3
I had a similar issue, while using Flutter on the stable channel. While running on iOS simulator I started to get this error: /[pathto]/Flutter/testtwo/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
The only thing that helped was to change the channel to beta (I actually tried to run there and it worked) and then back to stable but also pub upgrade. See below the sequence of commands. Note that after changing to a channel you need to wait to Flutter to do the build (it took several minutes for me):
flutter pub upgrade,
flutter channel beta,
flutter clean,
run app successfully... on iOS.
flutter channel stable,
flutter clean.
I hope it helps.
I had the same , I don't know what happened but my solution was :
Create a backup "iOS/Runner" plist is especially if you have some permissions or other thing stuff that..
After that in console write : flutter create .
.. that create one more time your iOS folder, apparently some files inside iOS are corrupter for some ¿bug?..
ahh too,, very important , open Xcode and not copy the file googleservices.json, you need take the file and put inside runner files (NO COPY!!)
don't forget flutter clean and restart invalid android studio.
good luck!
This is what worked for me.
Delete your .pubcache folder, you can find it where you installed flutter to (you can run "which flutter" if you are not sure where) it is usually a hidden file so you would have to enable your settings to show hidden files (shift + Command + full stop to show hidden files on Mac).
Run "flutter clean" in your terminal (ensure build folder is removed)
Delete symlinks, pods and podfile.lock from the ios folder
Delete your pubspec.lock file
Build again
If you are still having issues you can go further
Downgrade Flutter with "flutter downgrade"
flutter pub cache repair
delete Generated.xcconfig from ios/Flutter directory
pod install (from the ios directory)
build again

React-Native: Build error GeneratedInfoPlistDotEnv.h file not found

I had a old React-Native project which I wanted to give it a try again and when trying to run the project on iOS (Android works perfect) I get the error that Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h file not found.
If I run the project from the command react-native run-ios, than the build will succeed.
What can cause this issue and how can it be fixed?
I have tried to fix it with the comments from this issue but no success.
React-Native verision: 0.47
Full error:
<built-in>:1:10: fatal error:
'/Users/myUser/Library/Developer/Xcode/DerivedData/Project-gcaxrvbcwgkfhkadevoqxcprxszw/Build/Products/Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h' file not found
I fixed by copying file GeneratedInfoPlistDotEnv.h (in /ios/build/Build/Products/) to the path mentioned in the error message.
The path mentioned in error message for simulator is not same as real phone, you need to copy for a second time.
The development for React Native just like droped in a deep black hole, what you need to do is just climb and climb and climb...
Changing the Info.plist preprocessor prefix file to works for me ${CONFIGURATION_BUILD_DIR}/../GeneratedInfoPlistDotEnv.h
Image of code in Xcode 9
If you're coming from React version 0.60 and above, you should be referencing the package from GitHub instead of NPM. The author hasn't released auto-linking support on NPM yet, even though it's already merged!?
Try these steps after you unlink and uninstall the existing version of react-native-config. Remember to revert to default Info.plist preprocessor settings in XCode build settings.
yarn add https://github.com/luggit/react-native-config.git
cd ios && pod install
You don't have to add any other post-install scripts, just run the app like usual and it should work fine. Make sure you undo any other fixes before doing this.

Resources