![[Bild: orc9ajzkdwczpv72w7.png]](http://upload.iszene.com/images/orc9ajzkdwczpv72w7.png)
Auf Deutsch, siehe Beitrag von freefall.
Weiter unten

Fragen und Antworten zu dieser iPhone Anleitung findet Ihr :
http://iszene.com/thread-11089.html
f
f
Some time back, a TUAW reader requested for a means for his iPhone to "call home" on a regular basis in case of theft.
The mighty Erica Sadun, who knows more about coding for the iPhone than I could ever dream of,
has constructed a command-line program that returns the location of the cell phone tower nearest to the iPhone
should it go missing as well as the tower id,
longitude and latitude courtesy of Google Maps.
The following script, developed with Twitter's Britt Silvitelle,
allows users to set up a private Twitter account to phone home:
To do this, create a new Twitter account just for your iPhone (it will need its own unique email address,
separate from your main account, so have one handy).
Open the Settings panel, and look for the "Protect My Updates" checkbox.
It's towards the bottom of the page, just above the Save button. Check this and click Save.
With protected updates, only the Twitter users you approve will see the updates for this iPhone-only account
(just you? you + spouse? spouse, kids, and "special friends?" Up to you).
After creating your phone's Twitter account, you're ready to set up your iPhone to tweet in on a regular basis. Here's how.
- Install findme Add findme to your local binaries folder.
Under 1.1.3, I've been using /var/root/bin for my utilities.
If you use another location, substitute that path for mine.
Make sure to chmod 755 findme so that it can be executed.
- Make sure you have curl It's a standard part of the BSD distribution, if memory serves.
You'll need it to contact Twitter.
Your iPhone will only be able to call in via curl and Twitter if it has Internet access, through EDGE or WiFi.
f
- Create a tweet shell script Copy the following text into a new text file, and add it to your binaries folder.
#! /bin/sh
curl --basic --user username:_password \ (den _ bitte rausnehemn)
--data status="`/var/root/bin/findme`" \
http://twitter.com/statuses/update.xml
Use the proper path to findme and substitute your actual username and password. Make the file executable, i.e.
chmod 755 tweet
f
- Create a launch daemon In /System/Library/LaunchDaemons,
you'll find a simple daemon that runs once a day, called com.apple.daily.plist.
Copy this to com.sadun.tweet.plist, and edit it as follows:
Update the Label to com.sadun.tweet.
Kill the two lines that relate to "nice". You don't want your lojack to be usurped by other processes.
Change the program arguments to /var/root/bin/tweet.
Change the start interval from 86400, according to your needs. 86400 is once a day (60 seconds * 60 minute * 24 hours).
Right now, I have mine running every ten minutes (600) because I needed to check that the LaunchDaemon was functioning properly.
Label
com.sadun.tweet
ProgramArguments
/var/root/bin/tweet
StartInterval : 600
f
- Reboot. This allows our iPhone to restart, loading your new launch daemon.
[ Via iphonealley ]