Skip to content


My WWDC Overview

This whole week I’ve been at WWDC (Apple’s World Wide Developer Conference). This event has put me into situations that I never though possible; I’ve had a week that has been beyond surreal, with amazing encounters happening since day one.

It all started about a month ago, when I decided to write my party post. It had initially started as an easy way for my friends and I that had all won student scholarships to find out what was going on. At the time there was no definitive list, there were a few parties on upcoming and a few other small lists here and there, but nothing was complete.

I started to gather data, starting with the upcoming list and moving on to the twitersphere to augment my party needs. After a few days I had a reasonable list, far more parties and events than any other site, and the list was (in my mind) at least decently organized. I decided it was time to see if this list would be useful to anyone else.

The blog post started out small, with very few people really interested in it, but I knew that at least I’d find it interesting to keep up with listing all the parties. A week or so went by, and that’s when amazing things started to happen. First Jeff LaMarche posted about my list thanks to being informed by Sera Hill. Next Raven Zachary began to tweet about my list, and finally Brent Simmons wrote a WWDC tips post that included my link. It was the week before WWDC and I was in an amazing position to network throughout the conference.

The next few days were full of excitement and parties with some amazing people. I met the guys behind FlipSide5 while waiting in line for the keynote at 4:00am. I ended up with 10th row seats watching the unveiling of the new iPhone 3GS. I was in the front row for Stump the Experts and ended up attending a ton of super interesting sessions that I currently can’t talk about. But these were just the events.

Golden Ticket>As a result of my blog post I ended up meeting a ton of interesting people, from Jeff LaMarche and Dave Mark to Wil Shipley and the Touch Arcade guys. I ended up with a coveted Golden Ticket where I met a whole slew of amazing people. In general, I met with people I never thought I’d have the opportunity to meet and made some great connections.

I’ve learned a ton at this conference, and should, once the NDA is lifted, have a whole slew of information I’ll be able to give. Now back to working on fixing the bugs I’m having working with [Redacted], more info coming soon.

Posted in Development, WWDC.


My WWDC Plans

Quazie Hey, I’m Quazie, a 22 year old computer programmer and recent graduate of the University of Michigan. I’m going to WWDC this year, and i’m hoping to meet up with as many developers as I can, all WWDC and no sleep will give Quazie a fun week.

I’ve already written up a post on all of the WWDC parties and events that I know of, but here I’m going to layout what I’m actually going to be up to. If you want to meet up, drop me a line here, or on twitter (@quazie).

So on to my schedule, which i’ll be updating with my sessions once I figure those out.

Friday June 5th

Saturday, June 6th

Sunday, June 7th

Monday, June 8th

Tuesday, June 9th

Wednesday, June 10th

Thursday, June 11th

  • Noon – Brownbag
  • WWDC Party – 6:30-9:30 @ Yerba Buena Gardens (map)

Friday, June 12th

Saturday, June 13th

Posted in Development.


How to make functional iPhone settings – Fixing the nil until user plays with settings panel problem

Settings.bundle is an excellent system for allowing your users to set default settings for your app. It allows you to have settings without worrying about a new view in your app, and allows you to use the standardUserDefaults for some persistent storage, which is a plus.

Settings.bundle allows you to set default values for your various settings, the problem is that these default settings are not set until the user visits your application’s settings panel in settings.app. This means that when you access your settings, you are going to get nil instead of any value you were hoping for.

There is some sample code provided by apple on how to fix this, but that is clunky and an incomplete solution, no way to simply rely on the default values.

I found, and modified, some code I found at stackoverflow, that fixes this problem:

- (void)registerDefaultsFromSettingsBundle {
    NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
    if(!settingsBundle) {
        NSLog(@"Could not find Settings.bundle");
        return;
    }

    NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
    NSArray *preferences = [settings objectForKey:@"PreferenceSpecifiers"];

    NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]];
    for(NSDictionary *prefSpecification in preferences) {
        NSString *key = [prefSpecification objectForKey:@"Key"];
        if(key) {
            [defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key];
        }
    }

    [[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister];
    [defaultsToRegister release];
}

This function will set up the NSUserDefaults dictionary to be loaded with all of your specified defaults, which actually makes the defaults useful.

The next question is when to call this function? The answer is (at least for me) always. All that the code does is set the defaults, which doesn’t over-ride any set values. This means that you can (and I believe should) run this code on every run of your program to ensure that your defaults are set. I call the function in my app delegate’s applicationDidFinishLaunching.

Also, as a side note, if you want to set a value of one of your settings in your code just use [[NSUserDefaults standardUserDefaults] setFoo: forKey:] function. This will set the setting, overriding your default.

Posted in iPhone Dev Tips.


WWDC Parties/events – WWDC 2009

QuazieHey, thanks for checking out my party/event list. It’s a lot of fun putting this all together, and I hope that the list ends up being helpful for you. If you want to meetup with me at the conference (or outside the conference) check out my plans here. Hope to meet you at the conference. -Quazie

Also, While you are here, why not download my new app, Journey Through the Center of the Earth, or an app recently released by my friends – DoGood. Both availible right now on the iPhone.


This is a list of all the parties/events I know of during WWDC. If you know of any more, please let me know.

Friday June 5th

• Events

Saturday, June 6th

• Events

Sunday, June 7th

• Events

Monday, June 8th

• Parties

• Events

Tuesday, June 9th

• All Day Events

  • Three Wolf Tuesday – Wear this shirt to WWDC on tuesday and possibly get Delicous Library 2 for free – via twitter
  • Pandav iBart Giveaway – First 5 to find @Pandav and get iBart live for free

• Parties

• Events

Wednesday, June 10th

• Parties

• Events

Thursday, June 11th

• Parties

  • Palm Meetup – 6-8pm @ Thirsty Bear Restaurant & Brewery (map)
  • WWDC Party – 6:30-9:30 @ Yerba Buena Gardens (map)
  • Colorado Recruiting After Party – 10pm @ Tempest (map)

Friday, June 12th

Saturday, June 13th

No Date YET

Posted in WWDC.


Flat iPhone icon A.K.A get rid of icon shine

I’m in the process of wrapping up a few of my iPhone applications and have been debating over the finer points of icon design. One of the things that was frustrating to me was the default ’shine’ that the iPhone adds to icons by default. This is certainly helpful in many cases, but in others its just distracting.

Showing the difference between a pre-rendered icon and Default icon.

Showing the difference between a pre-rendered icon and Default icon.

The above example shows the difference between the icon I want (Journey) and the way the iPhone displays icons by default (iconexample). To me, the default shine on the application is just distracting and takes away from the icon, makes it harder t see whats going on. To get rid of the shine. (and keep the rounded edges) like the icon for Journey, you simply have to make a change to your info.plist.

UIPrerenderedIcon : true

To achieve this you simply have to go into your applications default info.plist, control+click and choose Add Row and paste UIPrerenderedIcon over whatever comes up by default. Then set its value to ‘true‘ (without quotes). On your next compilation you’ll be presented with a shine-free icon.

Posted in iPhone Dev Tips.


HTML drop-downs and Browser Refreshing

The other day I was working on an admin page for my CoffeeHouseCron project. I wrote up a simple HTML page, with a few drop-downs that would allow someone to easily set up the system to send out emails/tweets for where CoffeeHouseCoders would be for a given week.

In order to make the admin page more useful and usable I decided to try and figure out how to make the drop-downs have a default value. Each drop-down should default to where the system thinks CoffeeHouseCoders is going to be for the corresponding week. This seems like a very simple problem to solve, turns out it was, but my browser kept tricking me into thinking otherwise.

To set a default for my drop-down I changed a line of HTML from

<option  value="2" >at Espresso Royale on State Street </option>

to

<option  selected="selected"  value="2" >at Espresso Royale on State
Street </option>

This, happened to be the perfect thing to do, but it would be another half hour before I learned that I had written correct code. After reloading the page, none of my selected attributes were working. I tried everything from just SELECTED to a variety of different capitalization ranging from all upper case to having Selected="selected" but nothing would cause a drop-down to have a default.

Thankfully I was writing this code during CoffeeHouseCoders or I would never have found a solution. I asked Steve Fentriss what could be wrong with my code. After taking a peek, he informed me that indeed my code looked correct as I originally had it, and that he had experienced the very problem I was having before. He told me to do a Forced Refresh (sorry about the odd link, only good description I could find) and that should fix my problem. A quick forced-refresh later, and my drop-downs were working.

Here is what was happening, regardless of the fact that my code was written correctly, Firefox was acting on the old code. No matter what I changed FireFox didn’t care, viewing the source revealed changed code but FireFox didn’t want to update the drop-downs.

So next time you are having weird issues with your web code, and you are near certain that your code is correct , force-refresh and hopefully everything will correct itself.

Posted in HTML.

Tagged with , .


iPhone might be broken…

So it finally happened. After just shy of a year of iPhone usage and I’m finally getting some very weird and unexplainable bugs/errors. The most recent set of problems started on Saturday. While at the mall (right where the Apple store is… I wish I had gone then) my phone started to freak out, went into a continuous reboot loop. Looking this up online showed only information regarding jailbroken phones, something that I explicitly wont do to my phone to ensure that none of my iPhone development goes haywire.

I was able to resolve the rebooting issue with a lengthy restore process that took around a half hour, restoring my iPhone to the default state and then reloading all of my data… needless to say it was not fun.

Today, the fun bugs began, though I have a suspicion that they have been going on for quite some time, as I’ve seen momentary versions of these issues for the past week or so. First, when I turn my phone off of silent it immediately switches back. The button itself is not moving, but the iPhone is vibrating as if I am flipping the switch back and forth. Next the volume on the iPhone is randomly turning itself down, and the volume down button no longer works. This can be stopped by putting the phone to sleep, though it might not stop it.

In general, the sound buttons seem like they are all broken and I haven’t done anything weird to my phone to cause it. I’ll have an update tomorrow with what happens, heading to the genius bar tomorrow, hopefully they’ll be able to do something about this.

UPDATE:
Complete Apple Store win. Went in, showed them my issues. They went ‘Is it backed up’ and replaced it on the spot. Moral of the story: If you iPhone is under warranty take it to the iTunes store and they will replace it.

Posted in iPhone.


iPhone Simulator Audio Issues

I’ve been working on an iPhone app for the past few months. It is very audio dependent, which has lead to a variety of issues that come up either only on the iPhone simulator, or only on the iPhone itself. These issues have ranged from not being able to play sound on the simulator, to having sound working 100% on the simulator and not working at all on the iPhone.

As a result, I want to try to let people know about some of the issues i’ve had and how to fix them.

The biggest issue, which is the easiest to solve, is one that comes about when trying to play sound on the simulator. When trying to play sound you may get the following message on the console:

Error loading /System/Library/QuickTime/DivX Decoder.component/Contents/MacOS/DivX Decoder: dlopen(/Library/QuickTime/DivX Decoder.component/Contents/MacOS/DivX Decoder, 262): Symbol not found: _SCDynamicStoreCopyConsoleUser

or something similar, the following instructions apply to any message that says Error loading /System/Library/QuickTime/*.

To fix these types of errors:

  1. Navigate to /System/Library/Quicktime either via the command line or Finder.
  2. Delete the offending file, in this case DivX Decoder.component
  3. Try your app again.

There may be more than 1 component that is causing problems, so repeat the above steps until you hear sound. This error will only appear on the simulator, so if you don’t want to/can’t remove the offending components then you can still load the application on to your iPhone and try it there.

Hope these instructions help with your iPhone simulator audio problems.

Posted in iPhone Dev Tips.

Tagged with , , .


SharedInstance – Objective-c’s Singleton Paradigm

As I’ve been writing iPhone apps I’ve been using a variety of design patterns in my code. One of the most prevalent has been the use of singleton classes, which I’ve been using to store most of the data in my programs (I have found it much easier to access a singleton class than to pass around the object that stores all of my data).

The singleton design pattern is built into the iPhone SDK in a variety of places, most notably [UIApplication sharedApplication]. From this simple example, its not hard jump to the generic name sharedInstance that Apple uses for its singleton classes.

I’ll show you how to make a very simple singleton class, which I call SampleSingleton. You can also find the following code in a corresponding .h and .m at the end of this post.

To create a singleton class, you should have the following line of code in your .h file.

+ (SampleSingleton *)sharedInstance;

Now that little plus sign is what’s really important here. We are defining a Class Method, which many refer to as a ‘Factory Method’. This is because calling a method with a + in front of it will usually create an instance of that class. In this case, because we are using the singleton design pattern, it will only create an instance the first time the method is called. Every other time it will return that same instance.

For the .m we have to add the following line before the @implementation:

static SampleSingleton *sharedSampleSingletonDelegate = nil;

This will allow the SampleSingleton to hold on to itself once it has been allocated.

Next we have to define the sharedInstance function:

+ (SampleSingleton *)sharedInstance {
   @synchronized(self) {
      if (sharedSampleSingletonDelegate == nil) {
         [[self alloc] init]; // assignment not done here
      }
   }
   return sharedSampleSingletonDelegate;
}

Notice that this function does not change the sharedSampleSingletonDelegate variable. That will be done in another function.

Finally we have to define whole slew of other functions in the .m, mostly overriding functions of the NSObject class that would usually allow an object to be deallocated, but it also includes functions related to allocating and copying the object.

+ (id)allocWithZone:(NSZone *)zone {
   @synchronized(self) {
      if (sharedSampleSingletonDelegate == nil) {
         sharedSampleSingletonDelegate = [super allocWithZone:zone];
         // assignment and return on first allocation
         return sharedSampleSingletonDelegate;
      }
   }
   // on subsequent allocation attempts return nil
   return nil;
}

- (id)copyWithZone:(NSZone *)zone
{
   return self;
}

- (id)retain {
   return self;
}

- (unsigned)retainCount {
   return UINT_MAX;  // denotes an object that cannot be released
}

- (void)release {
   //do nothing
}

- (id)autorelease {
   return self;
}

It is extremely important to define all of the one line functions, but the most important function here is likely the allocWithZone: function. Its job is to set sharedSampleSingletonDelegate and ensure that no other instance of our SampleSingelton can be allocated, ensuring a singleton.

Thats it. For your own code, you can simply use the attached .h and .m files to start your own singleton class, or just copy-paste what I’ve written here (both are exactly the same). I’ll talk more about how I use singleton’s in another post, and I’ll likely do a quick post on the Refactor tool in XCode which will greatly simplify the use of the attached files by allowing you to simply rename all instances of SampleSingleton to whatever you might want to call your class.

samplesingleton.h samplesingleton.m

Posted in iPhone Dev Tips.

Tagged with , , .


Welcome to my new home.

It has been weeks of waiting, but I finally have it, Quazie.net is mine!

Since I started my blog on wordpress.com I had wanted to have my own domain, a place to learn the ins and outs of css, html, and whatever web development language I decide is right for me.  As a result, I’ve been looking for a good website.

My .com is taken, some company wants me to blindly bid and use some escrow service to get it from them, obviously this was not what i desired.  But Quazie.net was expiring, and it looked like it would expire soon.  This began a long and boring journey into learning how the DNS registry/registrars all work.

When I first noticed that Quazie.net was available, it was in ‘RedemptionPeriod’.  This is a 30 day wait period in which the old owner of a domain may spend a lot of money on top of the normal renewal fee to get the domain back.  This period exists to ensure that a business has every possible chance to get back their domain if they so choose, but from what I’ve read its actually just a pain in the butt system that companies will wait trough and try and grab their domain back later, once it becomes available, for less money than redeeming it.

After this 30 day wait period, a domain moves into ‘pendingDelete’ another delightful state in which you still can’t grab the domain.  This 5 day wait period exists so that everybody’s system can be prepared for the website to be available.  It seems a bit long to me, but apparently this is also necessary.

Finally on the 6th day of ‘pendingDelete’, Quazie.net was available to the public, and I was lucky enough to desire a website that no one else wanted.  That’s the boring DNS journey I’ve been watching occur on Quazie.net for the past two weeks.

More iPhone and interesting info coming soon…

Posted in General.