Xcode 11 archive gives PhaseScriptExecution failed
UPDATE 2:
This causes builds to be canceled! Have a look at S1LENT WARRIOR's answer below, it seems to be working better.
UPDATE 1:
In the latest version of Xcode (Version 11.1) you can do the build number auto increment fairly easily.
Here are the steps:
- Go to your target's
Build Settings
- Search for
Versioning System
- Set it's value to
Apple Generic
- Go to your target's
Build Phases
- Add a new Run Script
- Add the following line
agvtool next-version -all
Do this for all your targets and their build numbers will all be synced and updated every time you run any of the targets.
Got this answer from here: https://stackoverflow.com/a/58237340/1432355
P.S.: As said in a comment below
Using avgtool in a Run Script Phase causes the build to get cancelled
ORIGINAL:
You didn't do anything wrong I think.
If you go to your info.plist
you will see that the build number has been replaced by $(CURRENT_PROJECT_VERSION)
(you can find the variable in the Build Settings tab).
I am guessing you are using a script that increments build number automatically and that is causing the issue (I have the same thing on my project right now).
If you remove that script your app should build without this error.
I haven't found a solution yet on how to make the script work with this new $(CURRENT_PROJECT_VERSION)
variable. (I will update this answer when I have found the solution)
Command PhaseScriptExecution failed with a nonzero exit code when archiving
Solution 1:
it is due to Bare Expo Bundle Assets
here is the actual issue raised on forum:
https://forums.expo.io/t/ios-bundle-assets-error-when-building-release-403/36616
this pull (fix) request has merged into master
-
Solution:
update your expo-cli to expo-cli@3.19.2 or higher
npm install -g expo-cli
-
Note: Solution 1 is the answer to this question
Solution 2:
Open project directory on the terminal and run this command and archive again
react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ./ios/main.jsbundle
Solution 3:
Go to
Keychain Access
-> Right-click on login
-> Lock & unlock again
-> Clean Xcode project
->Make build again
Command PhaseScriptExecution failed with a nonzero exit code Failed to package project
For those who have the same problem , just check the provisioning profile and re-archive it will be resolved
check provisioning means , re doing it , recreation , adding ,etc ..
Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app
This work for me Thanks Alexander Lozano, I upload image for Xcode Version 12.0.1
Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code
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
Related Topics
Realmswift Cannot Cast Results<Someojbect> to Results<Object>
iOS Revoke Location Services Permission Programmatically
Aes 128 Message Decryption -- Swift, iOS
Swift Difference Between Var Arr:[String] = [] and Var Arr = [String]()
How to Get a Substring from a Specific Character to the End of the String in Swift 4
Swift Computed Properties Cannot Be Used in Init
Countdown with Several Decimal Slots, Using Nstimer in Swift
Didoutputsamplebuffer Delegate Not Called
Swift Custom Uitableviewcell Not Displaying Data
Wkwebview: How to Preload Multiple Urls
Check the JSON Response Is Array or Int or String for a Key
Error After Importing Swift into Objective-C
How to Make Watchkit Extension App and My iPhone App Share the Same Icloud Databases
How to Get the Index (String.Index) Value from the Cursor Position of a Uitextview Element in Swift