I want to write a perlscript on my iPhone that is able to give me a heads up at certain points so I'm wondering how I would go about doing that. Is there a way to get a message through the gui from a script running in the background? I've been looking without much luck. I had a thought about inserting a fake sms into the sqlite db as a last resort but it seems somewhat unlikely that it would work. It would be nice to be able to make a push notification style popup appear but that might too much to ask. Any ideas?
For reasons of security and stability, Apple does not allow scripting languages on the iPhone. You can run them on a jailbroken phone but I'm given to understand it's a hassle.
From the Apple Push Notification Programming Guide:
Note: On a desktop system, a background process is often the means whereby users are informed of downloadable data for an application that currently isn’t running. But on a device such as the iPhone, background applications are, for performance and security reasons, prohibited. Only one application may be executing at a time.
The iPhone is a secure and reliable phone first and a computer second. Computing is sacrificed to ensure a reliable phone.
Do you want information from your phone itself or from an outside source? If you want information from an outside source, you could set up a Perl script on a computer to e-mail yourself notifications (see Sending Email with Perl Best Practice).
I found a solution I liked so I decided to share it. I found an app for jailbroken iPhones called GriP - Growl for iPhone. Which changes the way push notifications and other messages are handled. It also makes it possible to send messages from the command line via something along the lines of:
/usr/bin/GriP -t "Title" -d "Description"
It has worked great so far. Thank you for your help TechZen and molecules.