Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:42:51+00:00 2026-06-17T04:42:51+00:00

I have a game which has xml files in it. My game works on

  • 0

I have a game which has xml files in it. My game works on iPad and on iPhone, and i need to perform some changes in these xml files accordingly, but the xml files are original and i do not want them changed, so what i want is have my xml files changed automatically at compile time. For this purpose i have a ruby script which does what i need.
Let’s say this script is level_converter.rb
which i can execute(in terminal) as follows:

for f in Resources/*.xml; do ruby level_converter.rb "$f"; done

So i added this code to Build Phases to Run Script this way and this does work as expected, it does change all the xml files properly, BUT ofcourse it changes the original xml files in the resources foler. So say if i run twice – i’ll have these files changed twice. What i want is these files stay not changed but only those deployed should change. So i need some kind of $(PROJECT_DISTRIBUTION_AND_DEVELOPEMENT_TEMP_FOLDER) or something like that instead of simply Resorces/*.xml eg.

for f in $(PROJ_DISTRIB_AND_DEV_TMP_FLDE)/*.xml; do ruby level_converter.rb "$f"; done

edit: must be im not that clear with the question, so i’ve rephrased it

Regards,
Igor

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:42:52+00:00Added an answer on June 17, 2026 at 4:42 am

    i was able to achieve what i wanted, here is the script:

    PROJ_DIR=${PWD}
    
    echo "Converting xml files..."
    for f in "${CODESIGNING_FOLDER_PATH}/"*.xml
    do
        cp $PROJ_DIR/Resources/"${f##*/}" "$f"
        ruby level_converter.rb "$f" $PROJ_DIR/key_hash;
    done
    
    exit 0;
    

    So i used this ${CODESIGNING_FOLDER_PATH} variable.

    explanation:

    • the for iterates the *.xml files in the destination directory
    • cp $PROJ_DIR/Resources/”${f##*/}” “$f”: as far as xcode only copies resources only if they were changed i have to manually copy the xml files to prevent them being converted more then once – so the converter is executed each build and so it should have original files in place to convert
    • ruby level_converter.rb “$f” $PROJ_DIR/key_hash; : this simply executes the script

    this does what i wan’t but there are drawbacks/doubts:

    • from time to time i get a warning that the signed resources where changed or removed (well that doesn’t surprise me though). Maybe there is a way to supress this? It does stop the app being sandboxed and i have to build again and hope there will be no warning next time. Lucky me it does not appear often
    • building takes much longer, it would still be nice to figure if the original files where changed and only execute the script if necessary
    • i still think there should be some “proper” way to achieve what i wanted
    • i am not sure i’ve picked up the variable CODESIGNING_FOLDER_PATH correctly, maybe i should use another one

    edit: i moved the run script to be run before compiling source code, and didn’t get any warnings about signed resources changed since then. Wandering if that’s the cause

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XNA arcade game which runs over Silverlight environment. The game has
I have an iPhone game which I am porting to PC. The game uses
In my game I have a base class of Loot which has methods universal
If I have a game which has a 3D world, and the world is
I have made a game which has a UISwitch that turns the music off.
I have an object named game which has a property called channels (which is
Let's say I have an entity called Game which has a home_school_id . I
I have an android game which loads a list of 'games' the user has
My question is really short. I have a game which has a reset class
I'm writing an iPhone game which has a number of levels. During play the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.