Reputation: 583
So I have a jailbroken iPhone and would like to automate some tasks on my phone but I would rather do this myself, rather than download tweaks or apps that can achieve this same functionality.
I do not have a Mac computer, so developing apps and/or tweaks will be a pain in the butt, from what I have read, so then I got thinking about Batch files. And .js
and .vbs
files that you can use to automate things in Windows.
Does iOS have any similar or equivelant's to Batch file scripting? Can I write a script that can perform a simple task on my iPhone once I have launched that script file on my phone?
Is this possible?
Upvotes: 0
Views: 3381
Reputation: 19030
Yes, jailbroken phones have access to bash, and as such you can create bash script files.
See here on how to start writing bash scripts. You write it to a file (typically ending in .sh
), make it executable (via chmod +x scriptFile.sh
), then run it (./scriptFile.sh
). There is also access to Ruby and Python, so you could write scripts in those languages too if you prefer.
You also don't need to write the scripts on the device, you can write them on your PC, and transfer the files over via SCP. This gets a little more complex, as you'll need to install SSH (and make sure you change the default passwords, there is a guide on how via Cydia), and other tools in order to copy them over.
Upvotes: 1