Archive for the ‘ Reference ’ Category

Integrating the iPhone SDK Simulator into Dreamweaver

Sunday, August 24th, 2008

Are you doing iPhone development on a Mac? Do you use Dreamweaver as your IDE? If your answer to both questions is ‘yes,’ then try this simple tip.

The iPhone SDK has an iPhone simulator that is, effectively, a fully functioning, pixel-perfect iPhone on your Mac. But because it’s an app on your Mac, it is also just another browser on your system. So treating it as such in Dreamweaver is a snap.

First, download and install the free iPhone SDK from Apple’s iPhone Development Center. Since you are not releasing apps through the App Store, you do not need to pay to be a part of the Application Developer Program. You just need a free developer account on Apple’s site.

Once you download and install the SDK, open up Dreamweaver.

  1. Go File > Preferences > Preview in Browser
  2. Click the “plus” button to add a new browser to your list
  3. Navigate to /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
  4. Select the iPhone Simulator.app
  5. Click Ok, and then close out your preferences
  6. Now the iPhone Simulator is in your list of browsers

There’s one quirk. The iPhone Simulator must be running in order for it to accept browser pages from Dreamweaver, so if you trigger it from Dreamwever and all you see is the iPhone’s Home Screen, then do it again in Dreamweaver. The second time, the page should come up in the iPhone’s browser.

Sphere: Related Content

Adding a $PATH environment variable in OS X 10.5 (Leopard) Terminal

Sunday, August 24th, 2008

One thing that will inevitably come up when setting up a web server using MAMP on OS X Leopard is the need to add the PHP and PEAR binary paths to the Terminal $PATH variable. Fortunately, this is dead-simple.

Open a Terminal window and type the following (assuming you’ve installed MAMP in /Applications):

export PATH=/Applications/MAMP/bin/php5/bin:$PATH

If you’re using PHP4 instead, you’ll want to specify that path instead.

Now type the following to see your newly edited $PATH environment variable:

echo $PATH

You should see your MAMP PHP binary path tacked onto your $PATH string.

Now type the following:

pear upgrade-all

If everything went according to plan, you should see the output from Pear updating itself.

Sphere: Related Content