Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a particular app that uses its own Ad Library aside from iAd. If I remove the correct folder prior to launching the app, No ads will be shown during that session. However, upon closing and relaunching the app, the folder is recreated and ads are shown. Trying to restrict access to the folder causes the app to crash upon launch. As such, my question is this:

Can I make my jailbroken iOS device run a command (in this case, rm -rf bla/bla/bla) and then launch an app, all from the touch of a homescreen icon?

share|improve this question
up vote 2 down vote accepted

You can replace the binary of the app with a .sh script. Pretend your app's binary is named App; rename it to something else like App.real, and then make an .sh script that's simply called App. Not, just App without any extension. Put your command in the .sh script, and then on the last line of the script, call ./App.real.

Edit: I tested this, but I never seemed to be able to make it do what I wanted. Maybe someone else can figure it out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.