Questions tagged [run-script]
112 questions
259
votes
7 answers
How do I add a custom script to my package.json file that runs a javascript file?
I want to be able to execute the command script1 in a project directory that will run node script1.js.
script1.js is a file in the same directory. The command needs to be specific to the project directory, meaning that if I send someone else the…

Jake.JS
- 3,266
- 3
- 15
- 18
36
votes
4 answers
What permissions are required for "Run Script" during a build phase?
In the "Run Script" build phase of my project, everything works if I type in the script into the text box for "run script" in build phases.
But to make editing / diffing etc easier, I thought I would save the script as a file as part of my project,…

Rahul Iyer
- 19,924
- 21
- 96
- 190
15
votes
3 answers
Errors building Xcode Project after adding in Run Script fatal error: lipo: input file
I had the following errors when attempting to upload my app to the App Store ERROR ITMS-90087, ERROR ITMS-90209, & ERROR ITMS-90125 as outlined in this Question Submit to App Store issues: Unsupported Architecture x86 and used the script shown below…

SamoanProgrammer
- 954
- 4
- 13
- 27
15
votes
2 answers
Set global environment variables inside Xcode build phase run script
I'm using Jenkins to do continuous integration builds. I have quite a few jobs that have much of the same configuration code. I'm in the midst of pulling this all out into a common script file that I'd like to run pre and post build.
I've been…

Bryan
- 614
- 1
- 8
- 18
14
votes
1 answer
How to properly run a npm script with arguments
I've written a small command line program with nodejs and I want to be able to type npm run test and run the program with the arguments below.
Typing the following command directly works,
node.exe scrappee.js -u 'https://github.com/matutter/{}' -us…

Aage Torleif
- 1,907
- 1
- 20
- 37
11
votes
1 answer
How to access Xcode user define build settings from run script in build phase?
I run a script during a build phase.
Xcode lets you define user-defined build settings. I thought I would use these settings to store values or paths that I want to pass to the script.
Is this possible? How can I pass user-defined build settings to…

Rahul Iyer
- 19,924
- 21
- 96
- 190
10
votes
4 answers
How can I programmatically add a run script build phase to an Xcode project?
I am wondering if it is possible to add a run script build phase to another Xcode project from within my Mac utility app. I can see what takes place in an Xcode project when a run script is added (doing a diff), but I don't know how to safely add…

Lizza
- 2,769
- 5
- 39
- 72
9
votes
2 answers
named parameter to npm run script
I would like to pass a named parameter to an npm run script so I can do something like the following:
"scripts":{
"say-hello":"echo $greeting && ls"
}
npm run hello --greeting=hello
I'd like it to then put 'hello' in place of the $greeting…

Ben
- 16,124
- 22
- 77
- 122
8
votes
2 answers
How to use Swift Flags inside a Run Script Build Phase in Xcode?
I added "-D MYOWNFLAG" to Other Swift Flags in Build Settings of Xcode.
Now, in my Run Script found in Build Phases, I want to check for the existence of the flag "MYOWNFLAG" and execute something (e.g. change Info.plist setting value) if it…

Dj S
- 10,232
- 1
- 21
- 24
8
votes
1 answer
Colored logging in terminal with NPM run script
I'm trying to setup a project exclusively with NPM as a build system (no Gulp or Grunt) so I'm a bit of a beginner, but so far it's working pretty nicely except for this little road block.
The scripts section of my package.json looks something like…

Physalice
- 81
- 1
- 4
7
votes
4 answers
Run Script Phase after dSYM is generated with Xcode 10 (on build)
In the New Features section, it states:
In the new build system, shell scripts can't rely on the state of build artifacts not listed in other build phases (for example, the
Info.plist file or .dSYM files.) Add files the script build phase
…

Maor Refaeli
- 2,417
- 2
- 19
- 33
6
votes
3 answers
How to execute large MySQL data-insert script file using command line in Windows 7?
I'm new to MySQL. I am interested how to do this via command line; I've tried but I get NO logging in the console output and the character set is not utf-8.

Nam G VU
- 33,193
- 69
- 233
- 372
6
votes
1 answer
Is there a way to avoid running `pod install` manually and not commiting Pods directory at the same time?
On my current project I am asked not to commit my Pods directory, and at the same time, guys want me to 'add some script' to XCode build phases which will run 'pod install' automatically before each installation if needed.
The goal is not to run…

joliejuly
- 2,127
- 1
- 21
- 24
6
votes
1 answer
Toggle run script build phase in Xcode
I have a run script build phase I have added to an Xcode project.
I want to be able to toggle this run script on when I want it to run and off when I don't.
Is this possible in Xcode and if so how can it be done?

Mike
- 10,297
- 2
- 21
- 21
5
votes
1 answer
PlistBuddy or code to display version information iOS
I am adding "Version Detail" in settings.bundle. What could be a better way to set that identifier, I have seen few do it through code other's use the run script with Plistbuddy.
Is it like that if you use plistbuddy, it show's the updated version…

NNikN
- 3,720
- 6
- 44
- 86