List Apps To Update After Moving iTunes App Store Countries

I moved my iTunes account from one country to another recently as I am about to move. An annoying thing is iTunes doesn’t know how to update apps that you’ve downloaded from a different country, even though if you download it manually again you get the app for free. It works on the iPhone/iPad, so its really something they should fix in iTunes.

If you have OCD like me it can be very annoying to constantly have a (1) or something by the Apps, meaning you have Apps to update. I recently worked out where this information was stored, and came up with a relatively quick way to update these apps.

1) Open Terminal.app

2) Run the following command:

grep --binary-files=text -A 1 "<key>title" ~/Library/Preferences/*.iTunes.plist

3) Find those apps in iTunes and right click them -> “Show in iTunes Store”

4) Download the app again, if you bought it before it will say something like “This update is free because you have already purchases this app”.

5) After you’ve updated it once, it remembers that you’ve downloaded it from the new country and it can automatically find the update as per usual.

Note: Be careful because if an app has been removed from the App Store altogether, iTunes will sometimes redirect you to another app from the same publisher. This happened to me, I was redirected from the free (discontinued) app to the paid version, and thinking it was the same app I bought an app I didn’t mean to.

DynDNS via curl on Apple TV 2

1) Copy this script to /var/root/dyndns.sh

#!/bin/sh
if [ ${ip=$(curl -s ifconfig.me)} != ""$(cat ~/.dyndns.ip) ]; then
curl "http://USERNAME:[email protected]/nic/update?hostname=HOSTNAME&myip=$ip&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
fi
echo $ip > ~/.dyndns.ip

2) Edit USERNAME, PASSWORD and HOSTNAME for your DynDNS account

3) Check it runs /var/root/dyndns.sh

4) Copy this script to /Library/LaunchDaemons/dyndns.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>dyndns</string>
<key>ProgramArguments</key>
<array>
<string>/var/root/dyndns.sh</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>

5) Run launchctl load dyndns.plist

6) Run launchctl start dyndns

Notes:
– You can adjust the interval so that the script runs more frequently than every hour by modifying the 3600 seconds
– If you want to update multiple hostnames you can put them in a comma separated list
– For more information on DynDNS see:
http://dyn.com/support/developers/api/perform-update/