Michael

This user hasn't shared any biographical information


Posts by Michael

ParseKit

While I don’t have an immediate need for ParseKit, I’m fairly certain that it’s going to come in very handy in the future.  Written by Todd Ditchendorf, the framework offers:

  1. String Tokenization via the Objective-C PKTokenizer and PKToken classes.
  2. Language Parsing via Objective-C – An Objective-C parser-building API (the PKParserclass and sublcasses).
  3. Parser Generation via Grammars – Generate an Objective-C parser for your custom language using a high-level grammar syntax (similar to yacc or ANTLR). While parsing, the parser will provide callbacks to your Objective-C code..

Head on over to the ParseKit website to download it.

Bypassing the Trouble Caused by Updating an iPhone App Provisioning Profile

[UPDATE] After many discussions on Twitter and many recommendations by different folks, I think that we have determined that the method outlined below is not necessary.  Mike Taylor has hit upon what appears to be a foolproof method for getting around the trouble caused by updating an iPhone app provisioning profile, and best of all, he did it in 140 characters:

@kalperin @MrRooni Delete old profile from Organizer. Download new profile ‘n drag to organizer. Restart Xcode. Choose new profile in target

Many thanks to Mike for helping me out here, I owe you a beer at WWDC10.  For those of you interested in the more masochistic way to get around the issues, feel free to continue reading:

A note before I begin: Everything below was done with the final build of the iPhone OS 3.0 SDK and I was building an app using the 2.2.1 frameworks.

I recently acquired a new iPod touch to use a development device.  One of the first things that I wanted to do was get my existing project up and running on the device so I headed over to the iPhone Development Program Portal to update my provisioning profile.

After adding the new device to my app’s provisioning profile I downloaded the updated profile and installed it into Xcode and onto the device via the Organizer.  So far so good, everything up until this point worked exactly as I expected it to.

Switching back to my project I changed my build settings to be a Release build under 2.2.1 on the device.  The app built fine, but I got an error when it tried to install the app onto the device, something error akin to “This device doesn’t contain the provisioning profile with which this app was built”.  Thinking that maybe Xcode just hadn’t seen the new profile yet I cleaned all targets in my project, restarted Xcode and tried again.  No dice, same error as before.

I then proceeded to delete all versions of the profile from the organizer and re-installed the new one.  My assumption was that once Xcode saw that the old profile didn’t exists anymore it would switch over and use the new one.  I cleaned all targets and built again.  This time I was treated to a different error: ”Code Sign error: Provisioning profile ’3E6AA725-6534-46F8-B9CE-D19AC9FD854B’ can’t be found”

After a bit of Googling I discovered that Xcode stores the ID of the provisioning profile in its project.pbxproj file.  This discovery led me to the fix:

  1. Close your Xcode project
  2. Navigate to your project folder in the Finder
  3. Right click on your .xcodeproj file and ‘Show Package Contents’
  4. Drag the project.pbxproj file to Xcode (or any plain text editor)
  5. Perform a search for the term ‘provision’ to find the PROVISIONING_PROFILE entry.
  6. Copy the existing profile ID and paste it into the find field of a find and a replace dialog.
  7. Open up the Organizer window (Window menu > Organizer) and navigate to your new profile under IPHONE DEVELOPMENT > Provisioning Profiles
  8. Click on your provisioning profile and copy its Profile Identifier
  9. Paste the string into the replace field in your open find and replace dialog.
  10. Replace all instances of the identifier, save the file, close it, and reopen your Xcode project.
  11. That should do it, build and go to run your app on your new device.

Now there is a great possibility that I am going WAY overboard here and missing a very obvious way to accomplish the same solution.  If that’s the case please let me know in the comments.

iPhone, Timezones, and WWDC (or, How I Stopped Worrying and Learned to Love iCal)

At 9:53 AM EST this morning I asked the Twitterverse the following:

WWDC iPhone question: When I land in SF will my calendar events be localized such that I won’t be showing up for things 3 hours late?

Thanks to @LarryRoth and @jeff_lamarche I have my answer.

According to Larry,

Yes. I travel all the time and it just works. Your calendar should be set to EST and when you land your phone will know it’s PST.

And according to Jeff,

You’ll probably need to manually set your computer to the right time zone, or you’ll be off by 3 hours.

What this means is that any events that I add to my iCal calendar will be shifted three hours down when I land in sunny San Francisco.  Therefore, when I add the sfMacIndie party to my calendar (it starts at 5pM PST) I need to add it at 8PM on my calendar while I’m in the EST time zone.  See the two images below for how my event times change as my time zone changes.

WWDC in EST

WWDC in PST

 

One recommendation that I can make to ease all of your pain is to use a service like TripIt.  My trip to WWDC was my first use of TripIt, and it has been wonderful.  Basically, it manages all your trip information in one easy place and even provides you with an iCal subscription link so that you can have your entire trip in iCal.  Once I had my flight and hotel confirmations I just forwarded them to TripIt and it automatically parsed the information out and created an itinerary from it.  From there I was able to add events manually to it (like the sfMacIndie party and WWDC badge pickup) and they were automatically entered into my calendar.  The best part is that I didn’t have to do any time zone math, I just entered the events into TripIt at the time they are occurring in PST and it handled making sure that they showed up properly on my calendar

WWTweetC

I am currently in the process of madly coding up a new Twitter app that will hopefully be available before WWDC. Before you groan about YATA (Yet Another Twitter App) let me tell you how mine will be different: I don’t expect it to have a life past June 13th.

WWTweetC is an app specifically designed for folks attending WWDC. It will filter your timeline and friends list down to folks also attending WWDC and allow you to find them easily, both inside of Moscone and out and about the streets of San Francisco.

The app will have three parts:

  1. Your timeline, showing only tweets from folks also attending WWDC.
  2. Your Friends list, showing all your friends, but sorted by those attending the conference and those not.  If there’s someone on your list that you know is attending the conference but (for some crazy reason) is not using WWTweetC you will have the option to filter in them and their tweets.
  3. The update screen.  The update screen will let you update your location inside of Moscone West (by selecting your location on a map of the conference center), update your location outside of Moscone West (using your current geospatial location), or post a new tweet.

The way that I plan on accomplishing most of this app’s functionality  is by hijacking your Twitter account’s Location field.  When you sign in using WWTweetC it will prepend your location field with ‘WWDC’.  Any location updates from that point on will replace your entire location field with ‘WWDC <your current location>’.

The success of this app is based on a few things:

  1. It being finished in a timely manner
  2. It getting accepted into the App Store before WWDC
  3. People actually using when we get there

I plan on open sourcing the project on Google code so that anyone that wants to help out will be able to contribute to its success.  I’m not sure what the average turnaround time is for app submissions, so it’s entirely possible that this app won’t be available by WWDC, but at least the code will be available for anyone to compile and install on their device.  If you think that this is a worthwhile app please tweet this post, tell your friends, and keep an eye out for future project updates.

Shilling for a DroboPro

That’s right, I want to win a Drobo, and I’m more than willing to use my blog to win one.  Here’s the deal:

Hey would you like to win a Drobo? All you have to do is link from your blog or website to MYDL.ME. That’s it – must be 18 and live in a country where Drobo ships to be eligible. We’re going to pick a winner on March 31 so get your link up now. We’re going to check our referral logs to pick the winner. Good luck. — P.S. If you don’t win but you’d like a good deal on a Drobo check this out. If you want to buy a 2nd Generation Drobo populated with four WD 1TB Green Drives for $849, you can. Just use the code MYDL849 at the Drobostore–Valid through 3/31/09.

Now that post says that the drawing and coupon are only good until 3/31 and of course it is now 4/17, but @drobo did post this tweet last night:

Picking the lucky DroboPro winner this Fri. Just follow @scottbourne, or link to http://www.mydl.me to play, and see who’s won. Please RT.

So I’m holding out hope.  Cheers!

UICatalog

Reading through Beginning iPhone Development by Dave Mark and Jeff LaMarche I came across his handy link to a fantastic piece of iPhone development sample code: UICatalog.

UICatalog is an Xcode project that uses all of the UI elements contained in iPhone’s UIKit framework.  There are quite a few great nuggets that this code produces such as:

UICatalog1UICatalog2UICatalog3