141
Showing Recent Messages:-1: mkdir -p /Users/spritzindia/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/Contigo.app/Frameworks

Showing Recent Messages:-1: rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/pothi/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework" "/Users/pothi/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/Contigo.app/Frameworks"

Command PhaseScriptExecution failed with a nonzero exit code

I deleted derived data. i have tried :

keychain access -> right click on login -> lock & unlock again -> clear Xcode project

Restarted machine, no use

How do I resolve "Command PhaseScriptExecution failed with a nonzero exit code" error when trying to archive project.

And I am using those librarys

pod 'IQKeyboardManagerSwift'
pod 'SDWebImage', '~> 4.0'
pod 'KRPullLoader'
pod 'Paytm-Payments'
Hiren Dhamecha
  • 640
  • 5
  • 15
Emin Kotan
  • 1,513
  • 2
  • 8
  • 9
  • In my case I just had to [clean derived data](https://stackoverflow.com/a/39495772/1010644) and build again. – landonandrey Sep 29 '20 at 11:51
  • Could you share your Run Scripts in the Build Phases section? – Pranav Kasetti Jan 04 '21 at 18:50
  • Benefited me here: https://stackoverflow.com/questions/61116011/command-phasescriptexecution-failed-with-a-nonzero-exit-code-xcode-11-3-1 I recommend you check it out. – JasuriOS Feb 17 '21 at 05:43
  • Restarting my machine works for me every time I get this error. – Tony Mar 01 '21 at 16:17
  • I had this issue because my Project file name had space, eg. "Ariven 2" , so changing to "Ariven2" solved the issue. – Ariven Nadar May 21 '21 at 09:35
  • I had this problem because I changed the system date of the MacBook multiple times. Restarting my machine works for me :) – Shrikant Phadke May 28 '21 at 11:46
  • Just remove space from folder name in your project path. make sure all folders are named properly. this should fix the issue – abdul jalil Sep 09 '21 at 12:24
  • Follow the answer https://stackoverflow.com/questions/53289524/xcode-10-2-1-command-phasescriptexecution-failed-with-a-nonzero-exit-code/69883902#69883902 – Naresh Nov 09 '21 at 07:43

58 Answers58

124

After trying all the solutions, I was missing is to enable this option in:

Targets -> Build Phases -> Embedded pods frameworks

In newer versions it may be listed as:

Targets -> Build Phases -> Bundle React Native code and images

  • Run script only when installing

Build Phases

kingPuppy
  • 2,749
  • 1
  • 17
  • 17
Anurag Sharma
  • 3,442
  • 2
  • 25
  • 41
  • 7
    can anyone explain why this answer work? also will this cause any unexpected behavior I should be aware of? – Nicolas Le Gorrec Mar 20 '20 at 17:12
  • 2
    @NickLeGorrec, Please check the below links to read about them: https://stackoverflow.com/questions/5913199/xcode-run-script-build-phase-run-script-only-when-installing-option https://stackoverflow.com/questions/6910901/how-do-i-print-a-list-of-build-settings-in-xcode-project – Anurag Sharma Mar 23 '20 at 17:46
  • 2
    Debug-installing on a device (build & run from Xcode) does not count as "installing". The run script only runs when archiving – Lal Krishna Aug 01 '20 at 06:02
  • 17
    now it's changed it's stated as run script: For install builds only – Shalabyer Feb 17 '21 at 14:09
  • 2
    that's work in build . but error showed when i Archive project again! – Meisan Saba Oct 10 '21 at 15:48
  • Can some one please send the code that needs to be added. i had this "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh" but looks like we are changing pods-Runner to Pods-Pod. @AnuragSharma – Mohamed Abdul-Malik Apr 25 '22 at 07:48
  • I'm white labelling the existing App, so I have changed cp -r "$PATH_TO_GOOGLE_PLISTS/GoogleService-Qa-Info.plist" to cp -r "$PATH_TO_GOOGLE_PLISTS/GoogleService-Info.plist" – Prabakaran Muthusamy May 04 '22 at 13:23
112

Go to

  1. Keychain Access -> Right-click on login -> Lock & unlock again

  2. Xcode -> Clean Xcode project ->Make build again

david m lee
  • 2,337
  • 25
  • 14
Isaac Smorong
  • 1,277
  • 1
  • 7
  • 11
79

Run the following commands from the ios directory:

  1. pod deintegrate
  2. pod install
  3. XCode Clean build

Or, One-Liner:

pod deintegrate; pod install

gignu
  • 878
  • 1
  • 9
  • 17
Abhishek Bedi
  • 4,677
  • 1
  • 33
  • 59
27

Warning: Legacy Build System is deprecated and will be removed in a further release.

Xcode -> File -> Workspace Setting -> change Build System to Legacy Build System.

Note - Its not the ideal solution.

Ankur Lahiry
  • 1,858
  • 1
  • 11
  • 23
Haseeb Javed
  • 1,523
  • 14
  • 17
  • 3
    That returns Permission Denied for Pods/Target Support Files directory – pixel Jan 13 '20 at 22:09
  • 21
    This might solve the problem but is not an ideal solution since XCode New Build System is designed to optimize the build process. – Abhishek Bedi Jan 18 '20 at 08:35
  • 1
    Thank you, this helped me to solve this issue on the old project. – derpoliuk Nov 21 '20 at 16:29
  • 5
    You are not resolving the issue, you are just hiding them. – iPeter Nov 25 '20 at 20:01
  • 2
    Changing the settings to `Legacy Build System` at least showed me the error messages. I fixed the issue and then set it to new build settings again Thank you Haseeb! – MBH Mar 18 '21 at 13:04
  • This solution helped me to find the actual issue, yarn was missing in my case under FBReactNative component. Once fixed reverted back to new settings. – Dobin Jun 17 '21 at 10:59
24

For me, I was removing Crashlytics, Fabric and FirebaseCrashlytics. So there was a script (Run Script) for Fabric. So since app was running that first and I had removed the framework already, I was getting this error. So I removed the Run Script tab for Fabrics and then it worked perfectly fine.

Harshal Karande
  • 411
  • 3
  • 9
16

Xcode 12.2 solution: Go to:

  1. Build settings -> Excluded Architectures
  2. Delete "arm64"
Andrei Traciu
  • 187
  • 1
  • 2
  • It works but when it's and real deice but not I need to add arm64 again when need to use an emulator. My Xcode version is 12.5.1 and using Mac M1, real device, iPhone 7. any help. – Ahsan Jul 28 '21 at 07:03
15

I was facing this issue because of Firebase Crashlytics. In Targets -> Build Phases -> Run Script

I had Firebase Crashlytics written like

${PODS_ROOT}/FirebaseCrashlytics/run

I changed that and put it in double quotes

"${PODS_ROOT}/FirebaseCrashlytics/run"
Rajat Mishra
  • 767
  • 5
  • 14
12

I have faced the same issue in Xcode 13. I have updated the Crashlytics SDK after that I got the same issue. In my case I have followed the Solution2

Solution1:

I have removed the data from Run Script.

-> Targets ->go to Build Settings ->Click Run Script -> Remove data

enter image description here

Solution2:

If script is mandatory to your project just select install builds only option.

Select For install builds only option

enter image description here

Script:

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/#####/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

In the above script ##### is the app name, if required use your app name. If not use below script.

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

Solution 3

And one more importent thing is you must set the path of the file properly.

Find the below example path.

You have multiple google services plist piles, in this case you are maintaining 2 different files. Your google service info plist file was under FireBase, Dev. In this case you must add these files path properly. Otherwise you will get the same error.

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/#####/Firebase/Dev/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

Solution 3 file structure:

enter image description here

Naresh
  • 14,724
  • 6
  • 94
  • 103
10

For me, the issue was with the node version that xcode was using. My project was building fine in Expo but not in Xcode after ejecting. I found my answer here: https://github.com/expo/expo/issues/8488

  • check you have the latest version of node

    $ node --version

  • delete the version in /usr/local/bin/

    $ rm /usr/local/bin/node

  • re add a sym link

    $ ln -s $(which node) /usr/local/bin/node

Mike Skinner
  • 151
  • 1
  • 6
9

Restart worked for me... Mac OS restart, not xCode restart...

Pau Ballada
  • 1,245
  • 12
  • 11
8

I had a similar error

/{path to project root}/Pods/Target Support Files/Pods-{project name}/Pods-{project name}-frameworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

In my case I had received a zip of a repo that included the Pods folder. It turns out that at some point between it being originally created and sent to me, the *.sh files in Pods/Target Support Files/Pods-{PROJECT}/ had all lost their execute permissions. Giving those files +x was the solution

For Example: chmod +x (File name in the error)

In my case: chmod +x Pods-TestExample-frameworks.sh

Shahid Aslam
  • 2,575
  • 3
  • 23
  • 31
bengoesboom
  • 2,041
  • 2
  • 21
  • 26
7

The reason

This build phase also lets you provide a list of input and output files. The script always runs when no input and output files are provided. When input and output files are provided, the script only runs if it has never been run before, one of the input files has changed, or one of the output files is missing

If you are using cocoapods, you may not be required to have an additional run script .

The solution

So the solution is remove the script as follows:

enter image description here

Abir Ahsan
  • 1,776
  • 15
  • 31
6

try this step if you need: Xcode 11.5 1- open terminal: cd Path_project 2- cd pod clean 3- pod install

if nothing change make this step

1- open Build Phases for target -> [CP] Embed Pods FrameWork check this field enter image description here

iDecode
  • 12,616
  • 7
  • 58
  • 106
6

In my case the error was caused by the lack of space on my machine. Deleting old builds fixed the problem.

6

In Xcode 12.4, after hours of try found the solution to this.

Go to Target > Architectures Set Build Active Architecture Only to YES and Excluded Architectures to x86_64 enter image description here

Daya Kevin
  • 721
  • 11
  • 20
5

Another reason for the error might be is that Xcode is running a script during the run phase.

If this is the case, you have 2 options:

  1. Delete the script (makes sense if the script is NOT important)

  2. Modify/update the scripts location path (Xcode might not be able to locate the script)

Run Phase Script

In my case, the script was important, so I modified/updated its location.

Originally, the script location path was written like this:

$SRCROOT/scripts/clean-assets.sh

Because the scripts path contained spaces (I moved the project to a new directory), I changed the path to this:

"$SRCROOT"/scripts/clean-assets.sh

By adding quotes to SRCROOT, changing it to "$SRCROOT", the error will go away.

Krekin
  • 1,387
  • 1
  • 12
  • 24
4

If you are doing Unity Project. You can get this error.

Command PhaseScriptExecution failed with a nonzero exit code

The solution is very simple

https://forum.unity.com/threads/error-on-build.561706/

Pre-requisites: Have cocoapods installed

Not Needed: 1. Install "cocoapods" for installing run following line in your terminal: $sudo gem install cocoapods

  1. Open your project folder using terminal
  2. Run this line: chmod +x MapFileParser.sh
  3. Run this line: chmod +x process_symbols.sh

It worked for me)

I think that installing "cocoapods" is not necessary, only step 3 and 4 enough to solve, but it does not work, you can try it.

Kamran Gasimov
  • 955
  • 1
  • 11
  • 10
4

If you experience this issue in flutter. Try running the application on a real iPhone device from other IDE like android studio or vs code.

The issue was flutter SDK missing iOS-profile-release.

So by running the flutter command

flutter run

It downloads the missing things before running and this solves the problem.

Yahya
  • 161
  • 9
3

For Xcode 11, React Native development environment. I usually have this problem when a dependency is not updated.

You can try following these steps, this usually works for me:

1- Delete your Podfile.lock (I like to use the command '-rm -rf Podfile.lock' on the terminal for this)

2- Delete your Pods folder (I like to use the command '-rm -rf Pods' in the terminal for this)

3- Delete your .xcworkspace

4- Pod install

5- Clear your project into XCode> Product> Clean Build Folder

Umair Raees
  • 119
  • 6
3

I have a project in React Native and suddenly this error appeared. I was doing something with homebrew beforehand and this solved the issue for me:

brew update
brew upgrade
brew cleanup
Dharman
  • 26,923
  • 21
  • 73
  • 125
Dick Thunder
  • 328
  • 3
  • 15
3

solution for me, none of these arch -x86_64 pod install and etc does not work until I did these steps:

  1. run sudo gem install ffi in terminal.

  2. then run arch -x86_64 pod install and build again.

and worked fine.

2

By mistake I had uninstalled carthage from my system. Adding that fixed the issue for me.

Step 1: Download & install latest carthage DMG here: Carthage

Step 2:

carthage update --platform iOS --cache-builds

Step 3: Run project & enjoy. :)

Mohammad Zaid Pathan
  • 15,352
  • 7
  • 92
  • 124
2

I tried everything above nothing worked for me it was a space in a folder name

/swift files/project a/code.xcworkspace -> /swift_files/project_a/code.xcworkspace
did the trick If I looked deeper it was stopping at /swift

TheBearF8
  • 365
  • 1
  • 3
  • 11
2

I got the error while using react-native-config.
Got this error since I had an empty line in .env files...

FIRST_PARAM=SOMETHING

SECOND_PARAM_AFTER_EMPTY_LINE=SOMETHING

3 hours wasted, maybe will save someone time

chenop
  • 4,186
  • 4
  • 40
  • 56
2

For me the reason was while changing name of app I added a single quote ' in name. I tried different solution and ran into different errors, but at last, while renaming app, I did not include ' single quote and it solved the problem.

2

For me, the issue was with Sentry.

  1. in Xcode navigate to targets->Build Phases
  2. delete the Upload Debug Symbols to Sentry phase
  3. clean the build folder and try the build again
kat
  • 5,173
  • 4
  • 17
  • 34
2

I used flutter to create iOS project. When build for Simulator, failed with the same error message. It is solved by following work.

xCode 12.3 Build Settings->Build Active Architecture Only, set it to Yes.

Zou
  • 315
  • 3
  • 6
1

I was able to resolve this error by remove file in Pods -> Targets Support Files -> Pods-AppName -> Pods-AppName-frameworks.sh. After removing that file again install pod using command pod install.

OR.

Try this:

-> quit xcode -> install pod(again) -> start xcode

Chandan Jee
  • 4,730
  • 4
  • 13
  • 24
1

Take Pods-resources.sh from project path and paste in Terminal

sudo chmod a+x "Pods-resources.sh file path here"

Example Usage:

sudo chmod a+x "/Users/path/Desktop-path/My Work-path/Pods/Pods-resources.sh"
José María
  • 2,723
  • 5
  • 24
  • 41
Balashekar
  • 121
  • 2
  • 11
1

In my case I have removed Run Script from the Build Phase in XCode.

Jaykant
  • 219
  • 4
  • 9
1

I tried most of above. I was developing in Flutter so what worked for me was pub cache repair.

Dharman
  • 26,923
  • 21
  • 73
  • 125
steveny909
  • 75
  • 1
  • 1
  • 8
1

I had this issue because my Project file name had space, eg. "Ariven 2" , so changing to "Ariven2" solved the issue.

Happy Coding :)

Ariven Nadar
  • 1,188
  • 11
  • 13
1

Actually I had this issue in building my first app looks like there is something changed in the new flutter version 2.5.3 the latest because when I downgrade to 2.5.0 I build on my simulator & my iPhone also with no issues

bebars1998
  • 11
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 30 '21 at 05:19
  • Upgrading to 2.8.0 does not seem to work either. Anyone who could help? – Siyah Dec 09 '21 at 15:23
  • Actually I think flutter have some fetal issues in the new versions so if you are just learning use an older version or if you want to make a real app use react native for now – bebars1998 Dec 10 '21 at 16:08
1

Nothing worked for me until going to VSCode(IDE APP), and ios/App/App.xcodeproj/project.pbxproj that file, and searched EXCLUDED_ARCHS = arm64, and delete that line,

I did the same thing from Xcode, like go to target>build settings, exclude arc thing, and deleted arm64 from there, didn't work before, but deleting from VSCode worked, weird

1

Delete these Folders/Files

  1. PodFile
  2. PodFile.lock
  3. Pods
  4. Runner.Xcworkspace

Select IOS device/Simulator From Android Studio If build Successfully then build app from XCode

Atif Ahmad
  • 11
  • 2
  • There are **54 existing answers** to this question, including a top-voted, accepted answer with over **one hundred votes**. Are you _certain_ your solution hasn't already been given? If not, why do you believe your approach improves upon the existing proposals, which have been validated by the community? Offering an explanation is _always_ useful on Stack Overflow, but it's _especially_ important where the question has been resolved to the satisfaction of both the OP and the community. Help readers out by explaining what your answer does different and when it might be preferred. – Jeremy Caney Mar 18 '22 at 02:06
0

In my case was that I changed a line in a script of my Xcode project and that line was badly written (I forgot to add ";" at the end of the line). So I added the ";" and clean and build project.

0

What helped for me was: In Targets -> Signing & Capabilities > Uncheck Automatically manage signing (or check and uncheck if it was unchecked ) > build project

Vadim F.
  • 686
  • 7
  • 21
0

Try this!

Build phases > Add > New Run Script Phase

Code:

# Type a script or drag a script file from your workspace to insert its path.
# skip if we run in debug
if [ "$CONFIGURATION" == "Debug" ]; then
echo "Skip frameworks cleaning in debug version"
exit 0
fi

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"

EXTRACTED_ARCHS=()

for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"

done

Xcode will refuse to sign them. The above script removes unused architectures.

Gurbela
  • 1,152
  • 1
  • 14
  • 38
0

From Xcode 12.2, you need to remove the $(VALID_ARCHS) build setting from your main and CocoaPods targets, and use $(ARCHS_STANDARD) for all targets. Also, switching to the Legacy Build System is no longer a good solution, since Xcode will deprecate this in a future release. Clear derived data after applying these changes, and before a new rebuild.

Pranav Kasetti
  • 7,067
  • 2
  • 33
  • 58
0

I switched from Firebase CocoaPods to Swift Package Manager.

The old symbols upload script still was listed in the 'Build Script' phase.

Delete this and replace with whatever is recommended. At time of publishing it was ' "${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"'.

0

what worked for me was going to Excluded Architectures and then deleting arm64 on each of the options provided and then clean build

cherucole
  • 495
  • 7
  • 14
0

When I encountered this error, it was only when I was archiving. Running and building worked fine but archiving kept throwing the error. What worked for me was updating my cocopods:

sudo gem update cocoapods
Allen
  • 171
  • 1
  • 4
0

In my case, my VALID_ARCHS was containing x86_64. After deleting it, my project has built without problems.

0

In my case "pod 'FirebaseUI/Facebook'" was causing Firebase to install an earlier version (Terminal: "Installing Firebase 2.5.1 (was 8.10.0)").

Removing "pod 'FirebaseUI/Facebook'" from the pod file fixed it.

LucasKarlsson
  • 999
  • 1
  • 9
  • 16
0

Solution for React Native: Run from project root

(Modify "PROJECTNAME" by the name of the project)

cd iOS

cd Pods/Target\ Support\ Files/Pods-PROJECTNAME

chmod 755 Pods-PROJECTNAME-resources.sh
0
error SyntaxError: 
Component has already been declared. (68:2)

See Xcode logs if you see the above error,then check your navigation I think you added a double component in your project navigation flow

0

Specifically for Flutter!

It turned out to be because I move a folder with .dart files to a new location and imports referencing the old directory were still in the code. Deleting those imports fixes the problem.

Unfortunately, with VSCode, all you get is a warning that the import is not used, not that it doesn't exits! Opening Xcode revealed these errors.

mauriii
  • 440
  • 2
  • 6
  • 15
0

I encountered this error in the context of a React-Native project running on iOS. I did several things so it's hard to know which one fixed it:

  • Make sure you don't have errors in your bash or zshrc profile -> I had a error related to my jdk. You will know if when opening a terminal window it shows an error/warning
  • Make sure you don't have spaces in the path
  • If you are using Firebase, make sure your GoogleService-Info file is in the ios folder and not in the ios>project folder
  • Do not keep the project in an iCloud folder, especially if you are low on space. I suspect this was a big factor for mine

Finally, my worked when doing these and running react-native 0.67.2. The newer version on it's own didn't fix it, I had to do at least one of these other assertions to get it working.

Things to consider:

  • Running the project in Xcode will usually give you more insight into the problem
  • Clearing the Xcode build folder wasn't enough on it's own to fix it but when trying a potential solution it is important you do it (and potentially also pod deintegrate && pod install) to make sure there are no traces of the previous ios build.
  • I am running node version 16.13, running node 17 gave me different errors and I wouldn't recommend it to date. I am running macOS Monterrey and Xcode 13.2.1, but I tried on BigSur and also Xcode 12.5.1 and the still got the error.

For react-native, this error is discussed in length here: https://github.com/facebook/react-native/issues/31181

0

For Mac M1, remove arm64 in build settings fix the issue on real device build. I add this string when run with simulator.

enter image description here

ChuckZHB
  • 1,214
  • 6
  • 19
0
  1. delete node_modules folder
  2. delete Pods folder under ios
  3. run yarn cache clean
  4. run yarn
  5. run cd ios & pod install
  6. enjoy build
wol
  • 107
  • 1
  • 13
0

If you need to run the project in a physical device, none of the answers worked for me in Xcode 13.3. What worked for me was deleting VALID_ARCHS = x86_64; from project.pbxproj everywhere. but this won't let you run in simulator

  • Removing x86_64 from VALID_ARCHS will prevent your app from running in the Simulator on Intel Macs. Probably one of your library dependencies is missing the x86_64 slice. – David Gish Apr 13 '22 at 03:51
0

In terminal go to project path and follow the below steps

  1. pod deintegrate

  2. pod cache clean --all

  3. pod install

iTALIYA
  • 813
  • 7
  • 13
-1

Probably you should do as follow:

  • Remove .xcworkspace and Pod folder
  • Run pod install
  • Delete derived data
  • Clean all project (press alt before click on click)

I tried above things and it worked for me.

Piotr Badura
  • 1,384
  • 9
  • 15
-1

Remove a space in fileName

ex)

  • AS-IS: /Users/user/Desktop/My Projects/TestProject/
  • TO-BE: /Users/user/Desktop/MyProjects/TestProject/
de.
  • 5,356
  • 3
  • 30
  • 60
-1

Just restart your Mac, it helped me

Booharin
  • 709
  • 9
  • 8
-1

In my case, I was running out of memory on my computer I opened some space on storage and it works as usual

Guvanch
  • 499
  • 4
  • 9
-2

I had the same problem in Xcode 11.5 after revoking a certificate through Apple's developer homepage and adding it again (even though it looked different afterwards):

Every time I tried to archive my app, it would fail at the very end (not the pods but my actual app) with the same PhaseScriptExecution failed with a nonzero exit code error message. There is/was a valid team with an "Apple Development" signing certificate in "Signing & Capabilities" (project file in Xcode) and locking & unlocking the keychain, cleaning & building the project, restarting,... didn't work.

The problem was caused by having two active certificates of the same type that I must have added on accident, in addition to the renewed one. I deleted both the renewed one and the duplicate and it worked again.

You can find your certificates here or find the page like this:

Also check that there aren't any duplicates in your keychain! Be careful though - don't delete or add anything unless you know what you're doing, otherwise you might create a huge mess!

Neph
  • 1,575
  • 1
  • 26
  • 54
-3

I was also facing the same issue , I fixed it by simply removing nvm and my app start working fine on IOS. Try this :

brew uninstall --force nvm
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 01 '22 at 15:51