Top
Search
Bio

I am a mobile software developer working for Asurion Mobile Applications in Nashville, TN. I prefer iOS development, but am plenty capable of Android and BlackBerry development.

Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.
Navigation
Friday
May252012

California Waiting

I’m pretty content with my current job and the work that I am doing. The only negative to this has been the business travel. While it can be nice (I can think of much worse things than a week or two in the bay area), it is physically and emotionally draining.

This is the second trip to the bay area for my current job. This trip was only one week instead of a two week trip. I like the one week trip, but everything seemed so hectic. I felt as though I didn’t have a moment to actually just rest. It also doesn’t help that I’m pretty restless when I’m away from Ashley and the puppies.

Wednesday
May232012

A Little Office Fun

My favorite office meme brought to life in Asurion’s San Francisco office. Not bad for my pitiful artistic talents.

Your Code is Bad and You Should Feel Bad

Friday
Apr202012

Continuous Integration for Xcode Projects

I recently had the strong desire to set up a continuous integration server on my home machine for personal projects. I had a few requirements for this setup:

  • The server should run locally on my Mac Pro
  • The server should be able to pull my projects down from a source code manager
  • The server should be able to build iPhone applications and deliver .ipa files
  • The server should be able to run tests in my iPhone projects
  • The server should be able to give a report of the test results

The Solution

After a little bit of digging, I found the perfect solution for my server needs: Jenkins. Jenkins is an open source tool written in Java. There are numerous plugins available with a great community behind it. You can install everything yourself, but I stumbled across a great Mac application that will start and stop Jenkins for you: Jenkins App. With this tool I have Jenkins in my dock, which is very reassuring. It sort of gives a point of access to the scripts that trigger the starting and stopping of Jenkins, which I find to be very helpful.

After some more searching, I found a few articles to help me set up everything:

With these two tutorials, I was able to get 95% of the way there.

The Other 5%

There were a few things it didn’t cover though. I had recently upgraded my Xcode to version 4.3.2. I was replacing the previous version that I had installed (4.2 I believe). During that time, Apple changed how you installed Xcode. The changes made Xcode a standalone application from the Mac App Store. While good, I ran into a few issues. The first was that Xcode command line was running the previous version. To switch to the latest version, I had to fire up Terminal and run this command:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Now when I tried to run my build plan in Jenkins, I failed with an error that I needed to accept the latest terms and conditions for Xcode. This one was a bit trickier, but I finally found the command to prompt me with Xcode’s terms and conditions:

sudo xcodebuild -license

After accepting this, my build plan ran very smooth and I am now up and running.

What You Should Take Away

This post isn’t a rewrite of the great instructions that I found elsewhere online, but rather an addition to cover the sticky spots that I ran into. I hope you find these tidbits helpful as I wanted to document them for anyone else who may run into them (as well as for myself).

Saturday
Mar032012

Interesting Android Problem

I've stumbled upon an interesting issue within the past two days that involves the Samsung Infuse running Android 2.2.1 (although I have only witnessed the issue on this particular device, my gut feeling is that this problem exists on all Samsung devices that run Samsung's skinned Android OS of 2.2.1).

The issue pertains to SharedPreferences. Apparently, Samsung has changed the default directory for an application's SharedPreferences' file to lie outside of the application's sandbox directory. This would not be a big deal, except for one small problem: If a user installs an application on this device and we store something in the SharedPreferences, it will remain on the device until the device is wiped. Normally, an application's SharedPreferences file will be wiped if the user clears an application's data (Settings > Applications > Manage applications > Application Name > Clear data) or the user uninstalls the application. With Samsung's change, however, the SharedPreferences file will live through this.

To test this, I have developed a small application to take advantage of storing data in SharedPreferences as well as storing data in an SQLite database. The database is wiped (as expected) on all devices when the user clears their application data or uninstalls the application. The SharedPreferences is wiped (as expected) on all other devices except the Samsung Infuse when the user clears their application data or uninstalls the application.

This becomes a big deal if a user installs an application and something is stored in their SharedPreferences that could lead to an issue (such as an email address with a new line character that will cause our servers to return a 400). Even if the user clears their data or uninstalls the application on a Samsung Infuse, they will continue experiencing problems because the SharedPreferences is not being wiped properly.

I would not consider this an emergency type of problem, but I definitely consider it something worth knowing and considering before you use SharedPreferences again.

To get around this problem, I developed a check that would determine if the application had been cleared on application launch. If it had, I simply clear the SharedPreferences. I could have moved everything over to a SQLite database, but this seemed like overkill for my situation.

Friday
Feb032012

Jet Lagged in San Diego

About to board my return flight home to Nashville. I never wanted to live in Nashville when growing up, but now I hate leaving it.

Although I had a pretty good time out here, I did not get to do any programming outside of work. I don't want to write code all the time, but I was hoping to get some written.

See you soon Nashville.