Wednesday, October 12, 2011

Upgrading to iOS 5 (3 of 4): iOS 5 Upgrade

On Wednesday, October 12, Apple is officially released iOS5. This is a very significant upgrade, with several fundamental changes to how your iPhone or iPad synchronizes and backs up data.  Over the next few days I am going to show you the simple steps involved in upgrading to iOS5 and also provide some details on some of the new features and how to take advantage of them.  Check out the new features on Apple.com  iOS5 is only supported the iPhone 3GS, iPhone 4, iPad, iPad 2 and iPod Touch (3rd generation). 




Step 3: Upgrading to iOS 5
It's official iOS5 is now officially released to the general public.  Hopefully you have been keeping up to date with my previous posts, if not there are links above for backing up your iOS devices and also upgrading iTunes to 10.5.  If you are ready to make the leap here we go.

  • Once you have confirmed that you are at iTunes 10.5 it is time to download and install iOS5.
    • Open up iTunes 10.5
    • Connect your iOS device to your computer using the USB cable
    • Select the Device in the left panel of iTunes to load the information screen for the device
    • Right click on the device and select "Back Up" to create an up to date back up prior to the upgrade
    • Click the "Check for Updates" button. 
    • You will be prompted about a new update being available and should click on the "Download and Install" option
      • The upgrade will do the following:
        • Download the actual iOS5 upgrade
        • Upgrade the firmware on your iOS device
        • Synchronize your device
    • If you are prompted to set up as a new iPhone or choose from back up just choose the back up you created earlier.
    • After the upgrade is complete I recommend hitting the Sync button one more time for good measure.  This will create a fresh back should something go wrong.
  • Congratulations you have successfully upgraded to iOS 5. More on the new features later.


Now let's turn on the wi-fi sync feature.  This feature will allow you to sync your iOS device without actually plugging it in to your computer. 
1. Go back in iTunes and plug in your iOS device. 
2. Once it appears in the Sidebar at the left click on it to see the Summary information for it in the right hand window.
3. You should notice a new option to "Sync with this iPhone/iPad over Wi-Fi"











4. Check this check box
5. Click the "Apply" button in the bottom right hand corner

6. Make sure you see this message at the top confirming that the iPhone/iPad sync is complete and/or that it can be disconnected.
7. Now just unplug the device (don't hit the eject button in the sidebar).

The first time you unlock the new device you are going to be prompted about a few things.  One thing it will ask is your Apple ID.  Use the same id you use for buying music, this will set it as the default Apple ID for several things.  Next it will ask you if you want to set iCloud.  I recommend saying no and reading my next post on configuring iCloud and Messages.

You should notice that the device stays in iTunes, even though your device is not connected.  Now as long as iTunes is open and your device is on a sync can occur between your devices without being connected.  If you want to try it out add a new artist under the Music tab and hit the Sync button in iTunes.  You can also trigger a sync from your iOS device by going to Settings > General > iTunes Wi-Fi Sync.
This also means that if iTunes is open on your computer and you plug your iOS device in to charge, it is locked (via it sleeping or you hitting the sleep button) and it is on the same network it will automatically back itself up.

See my post of the Top 10 Minor Features in iOS 5 to get started.

Tuesday, October 11, 2011

iOS 5 Top 10 Minor Features


My Top 10 Minor Features in iOS 5
There are a lot of new features in iOS5, I think Apple says something like 200.  Everybody knows about the iCloud integration, Notification Center, Messages, Photo Stream, Reminders app and Newsstand, but I always think the little things are what really end up making the big difference.  Here is my list of the top 10 minor features in iOS 5.
  1. Ringtones - All sound alerts including text messages can now use any ring tone. Settings > Sounds
  2. Text Shortcuts - You can now use your own acronyms as shortcuts for expanded text. For example you can add: omw for "On My Way!". If you type omw with the keyboard auto-correct will pop up "On My Way!".  Settings > General > Keyboard
  3. Twitter Integration - You can now log in to your Twitter account at the iOS level and Tweet from the Photos and Safari apps.  Plus it does a cool bird tweeting sound when you do Tweet, but this is configurable see item 1.
  4. iPod Split - The iPod app is no longer and instead there is now a Music and Videos app.
  5. Rich Text Formatting in Mail - Mail now has rich text formatting capabilities like bold, italics, underline and also quoting.
  6. Split Keyboard on iPad - The iPad keyboard is can now be dragged into two smaller keyboards.  This makes it much easier to type when holding it up.
  7. Multi-Touch Keyboard Gestures on iPad - Using 4 finger gestures you can now switch between apps (4 finger left or right swipe), go to the home screen (4 finger pinch) or bring up the dock (4 finger swipe up)
  8. Multiple Routes in Maps Application - Doing a search for directions will now return multiple routes that you can toggle between by selecting the number label on the route.
  9. Camera Improvements - In the Camera app you can now use the Volume up button to take photos.  You can also double click the home button on the lock screen to go directly to the camera without unlocking the iPhone.
  10. iPad 2 and iPhone 4S AirPlay Mirroring - The output of both devices can be output directly to the TV. Not exactly sure when this is useful, but it could be cool for gaming.

Upgrading to iOS 5 (2 of 4): Upgrading to iTunes 10.5

On Wednesday, October 12, Apple is going to officially release iOS5. This is a very significant upgrade, with several fundamental changes to how your iPhone or iPad synchronizes and backs up data.  Over the next few days I am going to show you the simple steps involved in upgrading to iOS5 and also provide some details on some of the new features and how to take advantage of them.  Check out the new features on Apple.com  iOS5 is only supported the iPhone 3GS, iPhone 4, iPad, iPad 2 and iPod Touch (3rd generation). 


Here is a link to the other steps:

Step 2: Upgrading to iTunes 10.5
As of Tuesday, October 11th, 2011, iTunes 10.5 is officially available.  This is the first version of iTunes to support wi-fi syncing of iOS 5 devices.  One new feature is the ability to automatically download music, apps and books purchased on iOS devices right to your computer.  You can also download any books, apps, music or tv shows you previously purchased from inside the iTunes Store without having to pay for them again.


Once again here are the steps for upgrading iTunes:
  • On the computer make sure you have the latest version of iTunes and upgrade if necessary. 
    • Open up iTunes
      • Check for updates (the current version is 10.5)
        • If you have a Mac select the "Check For Updates" item under the iTunes menu
        • If you have a PC select the "Check for Updates" item under the Help menu 
      • If any updates show up proceed with the upgrade to the new version.
    • Once you have confirmed that you are at iTunes 10.5 it is time to back up your iOS device
      • Open up iTunes 10.5
      • Connect your iOS device to your computer using the USB cable
      • Select the Device in the left panel of iTunes to load the information screen for the device
      • Sync the device to create an up to date back up prior to the upgrade
That is all for now until tomorrow when iOS 5 is officially released.

Sunday, October 9, 2011

Upgrading to iOS5 (1 of 4): Getting Ready to Upgrade

On Wednesday, October 12, Apple is going to officially release iOS5. This is a very significant upgrade, with several fundamental changes to how your iPhone or iPad synchronizes and backs up data.  Over the next few days I am going to show you the simple steps involved in upgrading to iOS5 and also provide some details on some of the new features and how to take advantage of them.  Check out the new features on Apple.com  iOS5 is only supported the iPhone 3GS, iPhone 4, iPad, iPad 2 and iPod Touch (3rd generation).

Here is a link to the other steps:
Upgrading to iOS 5 (2 of 4): iTunes 1.5

Step 1: Getting Up To Date
One big issue that is going to be addressed in iOS5 is iOS device owners not keeping their software up to date or synchronized/backed up with their computer.  So let's go through the steps you should take prior to Wednesday, to prepare your iOS device for the upgrade.  This requires your iOS device and the computer you used to set it up.
  • On the computer make sure you have the latest version of iTunes and upgrade if necessary. 
    • Open up iTunes
      • Check for updates (the current version is 10.4)
        • If you have a Mac select the "Check For Updates" item under the iTunes menu
        • If you have a PC select the "Check for Updates" item under the Help menu 
      • If any updates show up proceed with the upgrade to the new version.
    • Once you have confirmed that you are at iTunes 10.4 it is time to make sure your iOS device is up to date.
      • Open up iTunes 10.4
      • Connect your iOS device to your computer using the USB cable
      • Select the Device in the left panel of iTunes to load the information screen for the device
      • Sync the device to create an up to date back up prior to the upgrade
      • Click the "Check for Updates" button. The current version for the iPhone 3GS, iPhone 4(GSM), iPad and iPad 2 is 4.3.5. The iPhone 4 (Verizon) is at 4.2.10
      • If you are prompted to upgrade your device then you should proceed with the upgrade.
        • The upgrade will do the following:
          • Download the actual iOS5 upgrade
          • Upgrade the firmware on your iOS device
          • Synchronize your device
That is all for this step. In the future this is going to be much easier, but that is for another day. Stay tuned for the next post where I go over the steps for upgrading your computer to iTunes 10.5, your device to iOS5 and finally setting up wi-fi syncing. 

Wednesday, September 7, 2011

Loading Flash and Java Applets via Javascript


Working in Flex can help build really great for building very rich internet applications, however, when it comes to working outside of the Flash Player sandbox that is when things start to get a little more interesting.

Case in point... the application I have been working on required the ability to call a Java Applet.  The applet was required because there had been a lot of Java code written with very complex algorithms for generating a certain type of image.  We were concerned with the bandwidth usage required for going back and forth to the server for the images and also with the responsiveness of the Flex application as it waited for the response from the server.  The application in question involved a WYSIWYG editor and these images were generated at the end of a drop.

To execute the call to the applet there was a javscript function that would get called using the ExternalInterface class in Flex.  A call back was added that would then notify the Flex application when the image was generated.  The thing I spent the most time figuring out was the proper way for loading the applet into an html page, while supporting both browsers and also attempting to stay compliant to the latest html standards.

What I found is that the good old html tags that are thrown about for this are: <applet>, <embed> and <object>. Now depending on what browser you are developing for will dictate which tags get used.  My understanding is that for IE you use <object>, while for Mozilla you need to use <embed> tags.  The <applet> may work for both, but is considered deprecated.  Now this is where it gets really confusing because in order to support both browser types you have to add both sets of tags and in turn have to put a bunch of duplicate parameter definitions, etc...

So after banging my head against the wall adding tags and parameters inside the tags and then actually adding parameter tags, I went back to the internet and tried searching some more.  What I finally came across was an official Java page with instructions for using Javascript to dynamically add the applet at runtime based on browser type. Here is the page Java Rich Internet Applications Deployment Advice . Oracle provides a Javascript file you can drop in your web application and then add a couple simple lines of code to your html file and voila magically the applet loads correctly for your browser.  The Javascript files also include functions for validating the Java version and also downloading the latest version of the plugin.

Once I switched to this method it not only made my html much cleaner, but it also made the code xhtml compliant.  I did have some difficulties checking for a specific version of the Java Plugin, with it always just returning the major and minor version and not the revision/update version.  However, if you are looking to just add the applet this is the way to go.

It turns out there is a similar problem for embedding Flash Player applications inside html.  It all comes back to the <embed>, <object> and <applet> tags.  There is a specific set of parameters you have to put in and again have to use two sets of tags to support multiple browsers.  Again somebody realized this was a problem and said, "Hey lets just right a javascript function to dynamically add the correct object to the html dom."  Oddly enough Adobe actually includes this functionality as the "html wrapper" template in Flash Builder.  You will see a call in the html to AC_runActiveContent(), this is very similar to what the Javascript does for embedding a Java applet, but in this case it takes in the parameters required for a Flash movie.

Now this works well, but I did a little more searching, because "who wants to use the Adobe Standards" and found the SWF Object project on Google Code. It pretty much does the same thing as Adobe's recommended way, but is a little more robust and has what seems to be a pretty active community. Also one of the deciding factors was the ability to have the cursor and focus on a field in my application and also be able to type in it without having to click on the app. (That is for another post though)

So in summary embedding applets or Flash applications in html is really outdated and involves some really old and hard to use tags.  However, thanks to the smart people of the world, we now have some very easy to use javascript libraries that can be used to dynamically add these "RIA" objects inside our html documents.

Wednesday, August 3, 2011

PostgreSQL

When using the psql command line interface for PostgreSQL here is the command to get a list of all the tables in the database for a particular schema.



SELECT tablename FROM pg_tables WHERE schemaname = 'someschema';


Just replace someschema with your actual schema name and fire it off.  Voila a list of all the tables. #commandline4eva

Tuesday, August 2, 2011

Maven 3 and Nexus Incompatibility

Just a quick post on something I came across today.  We are in the process of upgrading to Maven 3 and everything worked fine on my local machine and even on our build server using Continuum.  However, when attempting to download the artifact generated as part of the build process I was getting an error about the artifact not being found.  I looked in Nexus and the artifact was there and the build results showed that it had indeed been deployed.

After a little searching I found the problem to be caused by a change in Maven 3 during the creation of the metadata that gets deployed to the repository.  Maven 3 has added some more information in the metadata than Maven 2.  In my case the version of Nexus we are using (1.6) has some issues with this change and doesn't correctly notify clients of the version.

Here are three possible fixes:
1. Upgrade to Nexus version 1.8.0.1 where the issue has been fixed. (http://goo.gl/AVgbT)
2. Stay at an existing version of Nexus but replace a library with a patched version (http://goo.gl/AVgbT see Maven 3 Metadata section for link)
3. Add the following parameter -Dmaven.metadata.legacy=true to your execution of mvn deploy. (http://goo.gl/7ZUix)

I went with the 3rd option because it was the least intrusive and now all is well.