Dec 01

I’ve been seeing a lot of iPad usage around me. I know what you’re thinking, “Duhhh, Captain Obvious! You live in Silicon Valley and this is where Apple is headquartered. Yeah, I think you might see a few.”

Silicon Valley is loaded with top-tech talent. Devices and gadgets that only the top-talent stereotypes understand and thrive on is abundant around me. I don’t even blink an eye when I see Segway zooming by with a laptop strapped to the handle bars, touring it’s driver around the city while their Bluetooth stereo headset is connected to their smartphone, providing the audio portion of the tour, while also feeding directions to the Segway via it’s GPS.

Just another day in Silicon Valley.

There’s something different about these iPad sightings. One that pleasantly captivated my eye and brought a huge smile to my soul. These sightings didn’t involve your typical Silicon Valley geek. In fact, the stars of these sightings are usually the last people you would expect to see or ever associate with the word, “technology.”

And I love it.

I was having lunch with a colleague and noticed an elderly gentleman, well into his eighties, sitting at the bar with a Martini in one hand while streaming some NetFlix videos to his iPad laying down on the bar.

Is streaming new?
No.

How about the ability to watch videos on a computer, is that new?
No.

The type of person performing this task was.

Apple has done something magical here with the iPad. They bridged what many would say was an impossible chasm. All joking aside, we do everything we can to minimize the technology in the lives of the senior citizens closest to us. The remote control for the television can instill the fear of God into them when they’re looking for the volume or channel button amongst the 40 or 50 buttons on the remote control. DVR? Don’t waste your money, they’ll never use it because it’s a foreign and complicated mental model for them.

Another sighting. At my gym I saw an elderly lady on the treadmill reading a book. Not just any book. Her iPad was sitting in front of her with the Kindle application running and the font size was probably set at 96 points as I read along with her from the other side of the gym.

Watching these people use their iPad I didn’t see the awkwardness and hesitation you normally see from them when using a laptop or desktop computer. They were, dare I say it, “at ease” with it.

Why is that?

All of the typical items that frighten senior citizens who are new to using computers are not present with an iPad. Let’s start with the mouse. My mother won’t even try to use a computer because of the mouse. She couldn’t comprehend or understand what to do when the mouse reached the end of the mouse pad, but her cursor was only halfway across the screen to her destination. She didn’t make that mental connection between what was happening onscreen versus what the device she was directly manipulating had on one another. When I told her to pickup the mouse and move it back to the other side of the mousepad, she just stared at me blankly.

“Well, if I move the mouse it will move the doo-hickey thing on the television screen and I’ll be back in the same position.”

“No, Mom. That will only happen if the mouse is touching the mouse pad. You can pickup the mouse and if it’s not touching the mouse pad, the sensor on the bottom of the mouse won’t detect the movement and therefore won’t move the mouse on the screen so you can move the mouse without moving the cursor … never mind, just trust me.”

What we take for granted is pure magic to them. It’s a mouse for us, but it’s a 747 flight deck to them.

Removing that middle-man translation and adopting the touch screen is much easier for them to understand. Want to launch email, just tap on it with your finger. Done. They get that. That makes complete sense to them.

Another reason is software installation. The App Store on an iPad compared to shopping and installing software for a typical computer is night and day. Easy access to the App Store, seamless purchasing and installation without introducing more confusing questions and concepts such as, “Where on your hard drive do you want to install this new fancy software?” or “Make sure you have enough hard drive space on the destination drive before proceeding?” mean nothing to them.

App Store, tap to buy, screen automatically moves to the new application icon that is installing. Tap to open. They can do that. They get that. That makes sense to them.

And to get them started, you should pick up a copy of iPad For Seniors For Dummies for them.

Written by Terry Blanchard \\ tags: , ,

Nov 09

About a year ago, I switched my broadband provider over to AT&T U-verse and have been relatively happy with it. One of my to-do items that was constantly de-prioritized was:

  • Turn off U-verse broadband router wireless (802.11b/g) and re-enable Apple AirPort Extreme wireless (802.11n)

A year later, I finally got around to it.

However, all was not rainbows and unicorns. What? How could my 802.11n wireless network be slower than the 802.11b/g network? This made no sense. And it wasn’t just a little bit slower. Oh, no. It was noticeably slower, almost by a factor of 3.

I tried changing the wireless channel and physically moved the unit assuming there was some kind of interference, but neither resolved the problem. My ping times to the AirPort Extreme were wacky. I was getting huge deltas ranging from 1 ms through 900 ms. They should have all been around the 1-5 ms range.

I browsed all of the AirPort Extreme’s settings using Apple’s AirPort Utility program and that’s where I noticed the problem. It’s a sneaky little bugger and one that I’ll have to admit, I didn’t really understand at first. Shhhh, don’t tell anyone.

There’s a setting under the Wireless Options called Multicast rate and it defaults to 2 Mbps but has options for 1, 2, 5.5 and 11 Mbps. Mine was set for 11 Mbps. Most people, including myself, would think that higher is better. But in this case, you’d be very, very wrong.

AirPort Extreme Wireless Network Options

Multicast Rate Setting in Wireless Options

I remember the factory default setting for this option was 2 Mbps, not 11 Mbps. I’m not sure how or when this option changed, but I assume that I thought what most people would think when they see this option; a higher number meant more bandwidth. I hate not knowing what an option does, so I read up on it.

What exactly does the multicast rate do and what affect do the different settings have on your wireless network?

Essentially, the multicast rate is the minimum speed that a wireless device must be able to communicate at in order to connect to the router. It’s a Quality of Service (QoS) setting that only allows devices to connect to it based on this criteria. So, the lower the multicast rate, the further away, or more accurately, the weaker the wireless signal, are allowed to connect. Higher multicast rates mean that only close, strong signals are allowed. Multicast is asking what’s the minimum quality that is needed to allow a device and your AirPort Extreme to maintain a connection.

Therefore, turning up your multicast rate will decrease the range of your wireless network.

If you are experiencing your wireless devices constantly losing their wireless connections, and then restoring those connections automagically seconds later; check this setting. It’s probably too high.

I changed this option back to 2 Mbps and my screaming fast network is back.

Written by Terry Blanchard \\ tags: , , , , , , ,

Nov 01

When Xcode 3.0 was released Apple introduced a new file format for the source code-unfriendly NIB format to the XIB format. XIB files are text-based and far easier to work with when you need to diff you changes before submitting them to version control. XIB files are only used during development and turn into the more efficient and smaller compressed NIB format when you build the product.

In a recent project I used iLocalize 3.8.4 to manage the localization process. The problem with iLocalize is that it only exports in NIB format so my English resource files were in XIB format, but all of the localized resources were in NIB. Fortunately, there’s a quick and easy way to do this with a single Terminal window session. Just type:

ls | grep nib | xargs -L1 ibtool --upgrade

and all of the NIB files in your folder will now have a corresponding XIB file.

iLocalize should do this for you automatically. Sadly, it seems like future development on this product has ceased.

Written by Terry Blanchard \\ tags:

Sep 21

As I write this, I’ve been working on an iPhone application that is very reliant on Internet connectivity. One of the challenges I encountered early in the development of this application was debugging the HTTP requests I was making and the responses I was getting back from the server. One of the requirements is that all communication was performed over HTTPS which clouded my debugging even further.

Meet Chuck, or Charles as the more formal and official name goes. Chuck is my new best friend. Yup, we’re so close that I can call him Chuck. We’re tight.

Charles is a web proxy, HTTP Proxy, and HTTP Monitor that runs on your Mac. Your web browser (or any other Internet application) is then configured to access the Internet through Charles, and Charles is then able to record and display all of the data that is sent and received.

In Web and Internet development you are unable to see what is being sent and received between your web browser / client and the server. Without this visibility it is difficult and time-consuming to determine exactly where the fault is. Charles makes it easy to see what is happening, so you can quickly diagnose and fix problems.

This is great for running your application on the iPhone simulator on your Mac. You can download a free-trial, but trust me on this, you’ll be buying the full version for $50 and thanking me later.

I was curious to know how some of the competing applications worked. While I can build and run my application in the iPhone simulator and use Charles to debug it, I couldn’t help but long for that same insight into other competing applications that I had on my actual iPhone.

Was there some way to have Charles work with my physical iPhone instead of the simulator so I could monitor it’s HTTP traffic?

Oh, hells yes!

It’s actually very easy to configure. Here’s all that you need to make this happen:

  • Your Mac with Charles installed and running
  • Your iPhone with the applications you’d like to monitor
  • Both your iPhone and Mac with Charles must both be on the same WiFi network

That’s it! Got that? Good, let’s configure it. First, we’ll configure Charles:

  1. From the Help menu, choose Install Charles CA SSL Certificate… This will allow you to debug and monitor HTTPS traffic.
  2. If you are debugging or monitoring an SSL connection (or HTTPS request), you will need to configure this in Charles. From the Proxy menu, choose Client SSL Certificates…
  3. Charles SSL Certificates Configuration

  4. Ensure that Enable SSL Proxying is selected. One of the great things about Charles is that you can use wildcards when choosing what SSL sites you would like to monitor. In the above screenshot, I am monitoring all HTTPS traffic on any .com domain.
  5. Run the Network Utility application and make note of your AirPort wireless IP address:

Network Utility IP Address

Now that your Mac is setup with Charles and the HTTP proxy, we need to configure your iPhone to use that Mac as it’s Web Proxy. But first, we need to install the Charles CA certificate on your iPhone.

  1. Open up Safari and navigate to (iOS 4) http://charlesproxy.com/charles.crt or (iOS 3) http://charlesproxy/iphoneconf. When you are prompted to install the Charles certificate, tap on the Install button.
  2. iPhone Install CharlesCA Certificate

  3. Open up your iPhone Settings application and tap on Wi-Fi settings. Tap on the blue disclosure indicator of your local Wi-Fi network
  4. iPhone Disclosure Indicator Network Settings

  5. Scroll down to the bottom of your Wi-Fi settings and tap on the Manual segment control in the HTTP Proxy settings.
  6. Enter in the IP address you wrote down from your Mac running Charles. In my case, when I ran Network Utility I had the AirPort IP address of 10.0.1.33. I put that IP address in my proxy settings as well as the default port Charles runs on, 8888:
  7. iPhone Charles Proxy Setup

  8. To verify your settings, open up Safari on your iPhone. As soon as you make an Internet request, Charles will prompt you on your Mac with a mesage box like the following. You want to click on the Allow button.
  9. Charles Proxy Allow

That’s it! Now fire up that application you’ve always wondered about.

Written by Terry Blanchard \\ tags: , , , , , , ,

Sep 01

“How can we automate our build number in this project? Perhaps a python or AppleScript?”

I get this question a lot. I contract out my development services to companies who need Mac, iPhone, or iPad software designed and developed. Many of these companies have lots of Windows developers on board full-time and contract out their Mac work so I understand that all-things Mac are new to them.

But this question always comes up. Always.

While they’re already thinking about some elaborate scripts to automate this process, I hold up my hands and say, “It’s already covered.”

I decided to blog about it because most people don’t know the name of the tool and can’t “Google” for it without stumbling across scripts to accomplish this task.

Apple includes a command-line tool called agvtool which handles my versioning needs. It’s not perfect, but it does what it needs to do and when used in a corporate environment with a build system, it’s fantastic.

What is it? In a nut shell, it’s a very focused “Find and Replace in Files” command-line tool. It searches through your program’s Info.plist file as well as the project .pbxproj file and updates them. You can even have it commit it’s changes with version control if you’re using Subversion or CVS.

The real number that needs to be constantly updated is the build number. Normally, the marketing version only changes at the beginning of a new branch or feature set. agvtool will help you out with both tasks. First, let’s tackle getting your project setup so you can display the following string in your iPhone About screen:

Version: 1.0 (Build 1)

The agvtool refers to the “1.0″ part as the “marketing version” and “1″ in the Build parenthesis as the project version. To update the build number we simply issue the following command from the project’s root directory which contains the .pbxproj and Info.plist files

agvtool bump -all

This command will change all of the build numbers, or project versions in agvtool speak, to:

Version: 1.0 (Build 2)

Want to change the marketing version to 1.1?

agvtool new-marketing-version "1.1"

Now our About box says:

Version: 1.1 (Build 2)

Cool, huh? Okay, so here’s how you setup your project to take advantage of this nifty little tool. First, we have to tell Xcode that we want to use agvtool for our versioning needs. From the Project menu, select Edit Project Settings. Ensure Configuration is set to All Configurations and Show is set to All Settings. Navigate down to the Versioning section and make the following changes:

Project Versioning Settings

Lastly, we need to update the Info.plist file. You need to set two values in, your Marketing Version is the Bundle versions string, short. If you don’t have this option in your plist file, select an item in the list and click on the + off to the far right. You can then select it from the list. The Bundle version is the build number. Set this value to match the one you placed in the Project Settings option for Current Project Version.

Versioning Plist Settings

Now, whenever you’re ready to build an official release, just run:

agvtool -usesvn bump -all

The -usesvn parameter is optional. For an official build, you’ll want to commit the files that were changed by agvtool.

Then call xcodebuild.

Earlier in the article I mentioned that agvtool isn’t perfect. Here’s what I mean by that comment. For an automated build, having a command-line tool is fantastic. However, if you run agvtool while you have the project open in Xcode, you get this:

Project Has Changed. Read From Disk?

Since agvtool went and changed the .pbxproj file while you had it open in Xcode, you get this. Simply click on “Read From Disk” and you’re back in business. More of an annoyance than a show-stopper.

Written by Terry Blanchard \\ tags: , , ,