I got an error when I tried to add flutter to an existing iOS app it worked fine on the android side, in IOS I got this error message :
/Users/mac/Library/Developer/Xcode/DerivedData/Fixit- dffmmspbqmueppghdvveloietubr/Build/Intermediates.noindex/Fixit.build/Debug- iphoneos/Fixit.build/Script-04B0EA9A232E6ABD008A0448.sh: line 3: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
/Users/mac/Library/Developer/Xcode/DerivedData/Fixit- dffmmspbqmueppghdvveloietubr/Build/Intermediates.noindex/Fixit.build/Debug- iphoneos/Fixit.build/Script-04B0EA9A232E6ABD008A0448.sh: line 4: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
inside my pod file i added this inside target application:
flutter_application_path = 'Users/mac/FixitApps/customerApp/fixit_flutter_customer_app/'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
I followed this tutorial: https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps
if you create a script file in the build phase for building dart code remove it and add this to your podfile :
flutter_application_path = 'Users/mac/FixitApps/customerApp/fixit_flutter_customer_app/'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
install_all_flutter_pods(flutter_application_path)
In my case when I have deleted some files from assets but forget to remove from pubspes.yaml.
Error solved after
remove deleted files from pubspes.yaml
click on pub get.
run on device
I am using a cloud virtual computer to build my iOS apps, in that case when I'm building the app, the machine got disconnected after I connect it again this above error popped up. But after I turn off the machine and restarted it, this error did not pop up.
Related
I'm making an app on flutter, but for some reason when i try to build my app and run it on my device i'm getting this error below.
/bin/sh: /Users/maps/Desktop/flutter/bin/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
I tried to:
Update sdk path because i transfer the project from a windows PC to my macbook
Cleaning and re-building the project
Deleting Pods folder and podfile.lock file and running pod install again
But none of these solutions worked for me.
Note: I'm beginner on Flutter development :-)
I'm installing a new project with a bunch of modules with React Native 0.64. I can do a pod install without troubles, but when I want to make my app running (with react-native run-ios or with XCode) this error occured on XCode :
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: readlink: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: dirname: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
This one on react-native run-ios :
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/thomas/Library/Developer/Xcode/DerivedData/appname-aqbmfgqjkshyqmaprdvggqaeqjrp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/**FBReactNativeSpec**.build/Script-A319AA7F2B7AAE771AE63D66A0049241.sh
Note that I don't have a 'scripts' folder in my node_modules/react-native (I just have assets, normalize-color and polyfills folders). I've tried to remove node-modules and reinstall it.
My specs are :
iOS Big Sur v. 11.2.3
XCode v.12.3
React Native v.0.64
CocoaPods v. 1.10.1
Node v. 12.14.1
Any help ? Thanks.
I found the solution after hours of debugging you need to modify this file for now.
Edit this file /node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
Add this line export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Then run the project using Xcode it will work 100%
The above answer is correct but in that case, you are editing the inside the node modules. So rather than just enter this command in your terminal
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
I'm working on a project with my friend and we sometimes share the project zip file without Source Controllers like GitLab. When I get and rebuild the project I face the error: ${PODS_ROOT}/SwiftLint/swiftlint causes Command PhaseScriptExecution failed with a nonzero exit code
I tried to remove lint by uninstalling from pods but now I get this error:
/project_address/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig: unable to open file (in target "SwiftLint" in project "Pods")
could some body help me find the solution? Thanks in advance
Remove the pod:
pod 'SwiftLint'
Remove the run script that looks like this:
"${PODS_ROOT}/SwiftLint/swiftlint"
Remove any custom configurations files that you may added with .swiftlint.yml extension from the directory that you are running SwiftLint from
I finally figured it out. After doing all the steps above I removed "${PODS_ROOT}/SwiftLint/swiftlint" from "project settings/target/build phase/run script" and works like a charm.
I'm having lots of trouble installing the 'Parse' Cocoapod library/framework on Xcode. (version 10.3)
What I did:
After initializing a podfile with "pod init", and adding "pod 'Parse'" into the file, I ran "pod install" from terminal and integrated the pod into Xcode. There are no compiler errors and the pod library is showing up and looking fine with autocomplete working on it as well
The issue:
Upon trying to run the app, it gives me an error:
Command PhaseScriptExecution failed with a nonzero exit code
More specifically, it gives me:
[filepath].../Pods-Real Estate App-frameworks.sh: eval: line 131: unexpected EOF while looking for matching `''
Things I've tried already:
Completely reinstalling and reintegrating pods
Restarting Xcode
Restarting my computer
Unlocking and relocking the login keychain
I tried installing pods and bolts just by downloading the framework files but they generated different errors (I think because the two frameworks weren't linked together properly doing it that way? I couldn't figure out how to fix that either)
Weird solution that I don't even know how I came across:
The issue was that a directory that contained my project had an apostrophe in it. I fixed it by renaming the directory, and then deleting the derived data folder in my project, cleaning the project and then running it.
My team is building our first iOS app using React Native. For some reason on my Mac only, the build fails after running react-native run-ios. This has been happening since we added Facebook authentication with the react-native-fbsdk.
We are all running node -v 7.0 and the latest version of Xcode. I have even tried deleting the repo locally and cloning it back down. As an experiment, another member of my team deleted his repo locally, cloned it back down, and was able to get everything working. We sat next to each other and did the exact same steps and it worked for him but not me.
Below is the error message I receive in my terminal:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/philmok/js_projects/pLot/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKGraphRequestManager.o RCTFBSDK/core/RCTFBSDKGraphRequestManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/pLot.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/pLot.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Per the answer on this question, I have tried running react-native upgrade. This will allow the build to complete but it prevents Facebook authentication from working.
Make sure you have downloaded the FBSDK for fb login. Place it in your documents folder and then open your project in xcode. click your project in the left menu and select the build settings tab, give 'framework path' the path to your FBSDK in documents.
add
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
to your Podfile and then pod install
Did you went through all configuration steps? Here is great introduction, step by step how to add facebook sdk to react native app: https://github.com/magus/react-native-facebook-login . Btw. I recommend to use this lib if you can, I had many problems with official facebook sdk, moved to that one, and everything works.