Questions tagged [run-script]

112 questions
2
votes
1 answer

Xcode 15 beta does not allow run script access to .git/HEAD and Info.plist

To access the current git branch and commit, I have been using this script successfully for a long time. However, with Xcode 15.0 beta, the script has no longer access to the git and Info.plist files. I am getting these errors: error: Sandbox:…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
2
votes
2 answers

Xcode build never finishes when using Firebase upload-symbols in Build Phase Run Script

I have Firebase Analytics and Crashlytics enabled in my app. As per the Firebase website, I have implemented the following in my Run Script, under Build Phases in Xcode: find dSYM_directory -name "*.dSYM" | xargs -I \{\}…
Mitchell D
  • 465
  • 8
  • 24
2
votes
2 answers

Python - Pandas: IF statement based on column values

I am trying to develop an IF statement, which will - Run another python script, if there are values in [Column Name] which are equal to zero. - Else do nothing. My original thought was to do something like if df['column name'] ==…
user12239916
  • 137
  • 2
  • 4
2
votes
1 answer

Check-and-run-apollo-codegen.sh for Apollo not working?

I am trying to install Apollo in my iOS Project. I follow the instructions here: https://www.apollographql.com/docs/ios/installation.html. When I complete the "Adding a Code Generation Build Step," I get an error. It cannot find the file…
Everett
  • 387
  • 1
  • 4
  • 17
2
votes
2 answers

Set Info.plist Value from Build Phase

I have an iOS for which I want to run a build phase that reads a value from a JSON file, export that as an environment variable and then read that in my Info.plist. I currently have: # Build Scripts/SetAPIVersion set -e if ! which jq >…
Kyle Decot
  • 20,715
  • 39
  • 142
  • 263
2
votes
2 answers

Could not find a valid GoogleService-Info.plist after handle different configuration in Build phrase

I am working on use firebase to tag in application iOS. I have different configuration in app, dev, prod, preprod, appStore. So I have several GoogleService-Info.plist in project. I renamed them as GoogleService-Info-Prod.plist, …
2
votes
1 answer

Swift script works directly inside Xcode Run Script phase, but not via external file due to NSTask/Process

I have Swift script: #!/usr/bin/env xcrun --sdk macosx swift import Foundation let task = Process() // other stuff The Process() is causing a problem. If I remove Process(), it works. Further, if I paste the Swift code into the Run Script phase…
abc123
  • 8,043
  • 7
  • 49
  • 80
2
votes
1 answer

Run script A inside a script B, and then exit script B without exiting script A

I'm writing a test for a script which I have written and works like the simplest tr command. My idea for a test was that I would run in parallel tr command and my script, save output to variables and compare the variables. First of all, how to stop…
ninigi
  • 143
  • 1
  • 3
  • 14
2
votes
1 answer

How to Not Run a Script When Running a Certain Scheme?

I have the following script saved as a Run Script in my project's target: git_output=$(git status | grep "nothing to commit, working directory clean") if [[ -z "$git_output" ]]; then xcrun agvtool next-version -all fi Which checks the git repo…
Stunner
  • 12,025
  • 12
  • 86
  • 145
2
votes
1 answer

iOS run script updates the settings root.plist but changes not reflecting in settings

I have an iOS app in which i have a settings bundle. The root.plist is: When I manually change the Item6>Titles>Item0's value and run it, it reflects the changes in device's settings page for the app. Now, I did a run script to set build version to…
Ocelot
  • 1,733
  • 4
  • 29
  • 53
2
votes
3 answers

Deny running scripts in nginx for specific url

I have a media folder on URL example.com/media/ and I want to deny users running scripts in my server. My server app is nginx and in How to deny script execution inside writable directories I couldn't find anything special about specific URL. This…
hamidfzm
  • 4,595
  • 8
  • 48
  • 80
2
votes
0 answers

H2 db: how to run a SQL script in the current directory

I'm trying to do this in an arbitrary folder: java -cp .;e:\tools\h2\bin\* org.h2.tools.RunScript -url myDBURI -script CreateDatabase.sql CreateDatabase.sql is in the current folder. Inside it I have: runscript from…
micdev42
  • 87
  • 2
  • 7
2
votes
1 answer

XCode 'Run Script' step to create directory and copy file is failing

I have the following custom script step during my build: mkdir -p "${CONTENTS_FOLDER_PATH}/Frameworks" cp "${SRCROOT}/testing.1.dylib" "${CONTENTS_FOLDER_PATH}/Frameworks" The script runs successfully, but when I check the bundle the Frameworks…
Kyle
  • 17,317
  • 32
  • 140
  • 246
1
vote
1 answer

How to specify a folderpath containing spaces in an environment variable that will be passed to cp in the run script build phase in Xcode?

I have the following line in a script I am running in the "Run Script" build phase in my Xcode project: cp -v "/Users/myusername/Desktop/foo2Texture5.png" $BACKGROUND_TEXTURES_FOLDER_PATH $BACKGROUND_TEXTURES_FOLDER_PATH is defined as a "User…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
1
vote
0 answers

Command phasescriptexecution failed with a nonzero exit development and production firebase

I'm trying to add firebase for my own project in dev and production environtment. I need to add GoogleService-Info.plist for Dev and Prod environment. After add new run script phase. There's error show phase script execution…