Unlimited Backup

Sync Your iOS Device Wirelessly with AppleScript

Sync Your iOS Device Wirelessly with AppleScript

Doug Adams shares a great AppleScript to initiate a wireless iTunes sync session, set up so that it runs automatically once a day:

A while back, I retired my iPhone 3G to the bedside table after buying an iPhone 4. I use the 3G pretty much as glorified clock radio-iPod Touch. I have a few radio apps on it and the Digital Clock app. I also have it set to sync and back up over Wi-Fi to my main iMac so I manually initiate a sync when I need to update Podcasts and apps and what have you.

This manual syncing has become tiresome. (I mean, if I used a traditional clock radio, I wouldn’t have to update its content manually, right?)

It’s simple enough to write an AppleScript to sync a connected iPhone but I want the script to run on a regular basis without me having to fire it. I like to listen to Podcasts in the evening so sometime during dinner would be a good time to update the 3G with any Podcasts that have arrived during the day. For this, I can create a launchd agent to fire the AppleScript that syncs the 3G in the background.

I had cron already set up (I followed this post), and I can confirm the script works really well (as you can see, I changed the script with “4S” for my device). Obviously, you can use this script without cron as well – it’ll simply sync with iTunes, but I guess it sort of defeats the purpose of this tutorial (unless you have a way to launch AppleScripts remotely). Doug also posted a similar script for automatically updating expired podcasts, which you can check out here.