(React Native) Error with npm run ios, build commands failed: PhaseScriptExecution - ios

I have a very simple project, just a webview and one signal notifications, and when I try to run the app in the simulator, I get the following error:
The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/felipesoares/Library/Developer/Xcode/DerivedData/appdicadehoje-aopcnwyfxemxetgqwqpniavuytog/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-9AE607B4C5601CAA7EF14079D91A3DE3.sh (in target 'FBReactNativeSpec' from project 'Pods') (1 failure)
How can I solve? I think it has to do with one signal or xcode, but I'm not sure

Make sure you installed your Pods correctly. Also, try to remove Podfile.lock, Pods folder & clean the build folder. Next, do pod install then open your .xcworkspace project and build again. I hope this works for you

Related

Compilation error with react-native-image-crop-picker and QBImagePicker

** BUILD FAILED **
The following build commands failed:
CompileStoryboard /Users/[APPNAME]/node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePicker/QBImagePicker.storyboard
(in target 'RNImageCropPicker-QBImagePicker' from project 'Pods') (1
failure)
when I try npx react-native run-ins or build through Xcode then I get this error.
I tried many ways like delete node modules, reset cache, clean build in Xcode and build again, pod install, change version of react-native-image-crop-picker.
When I uninstall react-native-image-crop-picker and try to build in Xcode then it says in node_modules no files exist relating to react-native-image-crop-picker.

react native: multiple command produce same file. XCode error

Getting following erorr in ios project, inside react native app.
Showing All Errors Only
Multiple commands produce '/Users/admin/Library/Developer/Xcode/DerivedData/myapps-cebtqkqvjkhixpaaqvrgdmyzymyv/Build/Products/Debug-iphonesimulator/react-native-test/react_native_test.framework/Headers/test.h':
1) Target 'react-native-test' (project 'Pods') has copy command from
'/Users/admin/Desktop/Baajar/myapp/ios/Pods/react-native-test/ios/test.xcframework/ios-arm64_armv7/test.framework/Headers/test.h'
to
'/Users/admin/Library/Developer/Xcode/DerivedData/myapps-cebtqkqvjkhixpaaqvrgdmyzymyv/Build/Products/Debug-iphonesimulator/react-native-test/react_native_test.framework/Headers/test.h'
2) Target 'react-native-test' (project 'Pods') has copy command from
'/Users/admin/Desktop/Baajar/myapp/ios/Pods/react-native-test/ios/test.xcframework/ios-arm64_i386_x86_64-simulator/test.framework/Headers/test.h'
to
'/Users/admin/Library/Developer/Xcode/DerivedData/myapps-cebtqkqvjkhixpaaqvrgdmyzymyv/Build/Products/Debug-iphonesimulator/react-native-test/react_native_test.framework/Headers/test.h'
i am using react: "16.13.1", XCode: 13.12.1
i tried pod deintegrate pod reinstall, pod cache clean, but nothing worked.
i searched solutions online someone says try to use old lagacy build system, but xcode doesn't allow it, it throws error.
i can not update react or xcode versions for some other depedency reasons.
attaching duplicate header files for reference. if i remove 1 copy out of 2 copy then it will throw 50+ errors.

Flutter AMSupportURLConnectionDelegate is implemented in both ?? Error

I am facing many issues since I migrated my project to an Apple Silicon mac. I finally managed to reduce the problems but not sure the answer to this.
Running "flutter pub get" in Flutter_the app copy 3... 760ms
Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install... 986ms
Running Xcode build...
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
objc[95181]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x20ba238f0) and ??
(0x1160dc2b8). One of the two will be used. Which one is undefined.
objc[95181]: Class AMSupportURLSession is implemented in both ?? (0x20ba23940) and ?? (0x1160dc308). One
of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
warning: Unable to read contents of XCFileList '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
'Runner')
error: Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-input-files.xcfilelist' (in target 'Runner' from project
'Runner')
error: Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11.
Is there any way to solve this. I am not sure if the problem is even written in there.
I was getting this error
Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib
NOTE:
Try this first if you have updated to flutter 2.10 from <=2.8
flutter pub upgrade
Solution:
Please open podfile and update with this script
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
flutter clean
flutter pub get
cd ios
pod install
or instead of last command you can try below for M1
arch -x86_64 pod install // for M1
Run your app.
I was getting the same "error output from Xcode build" with my M1 macbook recently as well after updating to Flutter 2.x.
I was able to clear this issue on mine by doing the following:
Change directory to your project's path and sub-directory:
your_project/build/ios/Debug-iphonesimulator/
Run $ xattr -lr Runner.app
Run $ xattr -cr Runner.app
Apparently flutter projects have extended attributes in project app bundles containing Finder info which causes an error.
I found these links that helped for reference.
https://developer.apple.com/library/archive/qa/qa1940/_index.html
https://github.com/flutter/flutter/issues/72492
Try Selecting For install builds only in the run script in the Build phases tab.
Two things need to change:
First check the Dependancy for APNs if need to upgrade. Then Change the version in the POD file and then add
pod 'GoogleUtilities'
To the POD target like following:
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_macos_pods File.dirname(File.realpath(FILE))
pod 'GoogleUtilities'
end
.
After this Run Flutter pug get and Flutter run. It works for me.
Ref screenshot for POD file

Info.plist: Permission denied . Command PhaseScriptExecution failed with a nonzero exit code Xcode 10

I read new instructions in Firebase & Fabric for Crashlytics in Xcode 10.
Reference : https://firebase.google.com/docs/crashlytics/get-started?authuser=0
Xcode 10 only: Add your app's built Info.plist location to the Build
Phase's Input Files field:
I used
"$SRCROOT/DemoProject/Info.plist"
But Getting issue at compile time.
Info.plist: Permission denied . Command PhaseScriptExecution failed
with a nonzero exit code Xcode 10
I have just recently updated the firebase with Xcode 10. Google made it very simple as you just need to follow these simple steps:
Install the latest pods
Add new Run Script in your Target
Install the fabric mac app (Follow the instructions)
Add $(SRCROOT)/Info.plist (in My case) and make sure your .plist file in root folder. Just build + run..
I had exactly the same issue. I did the following:
Removed Firebase from my podfile
Ran pod install (in the project directory)
Deleted the pod and framework file from my project
Added Firebase to my podfile
Ran pod install (in the project directory)
Cleaned the project folder
Build
After these steps I was able to build successfully!
EDIT: Was missing steps 2, and 4!

CocoaPods Build Errors

I am creating a new iOS project with CocoaPods but have been running into build errors.
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/.../Library/Developer/Xcode/DerivedData/CustomerApp-gicarwczuupvbxarirfljoeveuoc/Build/Intermediates/CustomerApp.build/Debug-iphonesimulator/CustomerApp.build/Script-EBA9FF40759E4567A8222C4B.sh
cd /Users/.../Documents/CustomerApp
/bin/sh -c /Users/.../Library/Developer/Xcode/DerivedData/CustomerApp-gicarwczuupvbxarirfljoeveuoc/Build/Intermediates/CustomerApp.build/Debug-iphonesimulator/CustomerApp.build/Script-EBA9FF40759E4567A8222C4B.sh
Command /bin/sh failed with exit code 2
I have checked
PodsFile.lock and Manifest.lock and they are identical
PodsFile.lock and Manifest.lock have -rw-r--r- permission
PODS_ROOT has been set in xCode Build Settings
Project Configuration has been set to Pods for both Debug and Release
I have also tried to recreate the test project, delete and refresh the PodFile and the Pod dir and no success.
(Obviously) If I remove the build phases related to CocoaPods the project then successfully builds :-s
xCode 5.1 CocoaPods 0.33.1

Resources