Aug 4 2010

Prevent iPhoto or Aperture from opening when you connect your iPhone

Thomas Viktil

This tip will only work on OS X.

Sam wrote a post at 37signals’ blog about the same thing (Tip: Prevent iPhoto from opening when you plug in your iPhone), but it didn’t quite apply to my situation. Sam’s tip will work fine if you have your camera nearby -which I don’t. Besides, I have a couple of cameras so I would anyway have to make changes to the script in order to make it work. A more simpler way to make this work is to approach it from a different angle.

I am going to present to you a script that only requires that you know the name of your iPhone. If you have already read Sam’s article you can skip to step 2 of this article to get the script.

1. Get the name of your iPhone

An easy way is to connect your iPhone, open iTunes (if it doesn’t automatically) and look at the list to the left. There it is!

2. Write the script

Open up up AppleScript Editor (on Snow Leopard, it’s inside the Applications > Utilities folder) and copy/paste this code:

on device_is_connected("iPhone name")
end device_is_connected

Change “iPhone name” to the name of your iPhone (I wrote “mandarinPhone”). As you can see, all it does is check if your phone is connected. Besides that, nothing.

3. Make the application

Save your script as an Application by clicking File > Save as …, and under File Format choose Application. I like to store applications like this under the Utilities folder. These are applications that I don’t ever have to run manually, so to prevent my root Applications folder from being cluttered with all kinds of stuff I don’t use I put it in the Utilities foldes. For this application I named it “iPhoneConnected”.

4. Open Image Capture

You’ll find it inside the Applications folder. Benjamin refers to the Image Capture application preferences as being a menu item. I suspect he was using an older version at the time he wrote the article. On Snow Leopard you do like this: If your iPhone is not already selected, select it by clicking on it. If the preferences don’t show up at the bottom of the list, click the button at the bottom. It will open up a preferences pane for the iPhone. Where it says “Connecting this iPhone opens:” click the drop down list and find your newly created application.

That’s it! Reconnect your iPhone and watch it do nothing. Lovely isn’t it? It sure is!

UPDATE: Benjamin Ragheb didn’t write the post at 37signals’ blog, but Sam did. Be sure to check out Benjamin’s comment below. He made a script which fetches the name of your iPhone for you -so you don’t have to. Nifty!


May 25 2009

iPhone dev: Remove the glossy effect from the application icon

Thomas Viktil

As you probably know, the iPhone adds a nice glossy effect to your application’s icon. It sure does look good, but sometimes it just doesn’t suit your icon. It can be prevented by editing the Info.plist file. It’s easy! Follow me.

iphone_app_01

Click on one of the lines to make the little plus icon appear. Click the plus icon to add a new line.

iphone_app_02

Give it a key name of UIPrerenderedIcon.

iphone_app_03

The value is by default set to String, but we need to change it to Boolean. Right-click the newly created line, choose Value Type > Boolean.

iphone_app_04

The value has now magically transformed into a check box.

iphone_app_05

Click it!

And you’re done. It’s as easy as that.