Advertisements

Interesting Issue with iPods and Launching Your iOS App


This isn’t documented anywhere that I can tell but here’s what was happening.

I was testing a universal iOS app that I was working on and decided to just use the iPod Touch (iOS v4.2.1) I had out at the time. Unfortunately when I’d launch the app a black screen would appear with the standard status bar and nothing else. I put a breakpoint in application:didFinishLaunchingWithOptions and found that it wasn’t getting called. Strangely the app worked fine on my old iPhone 3g (iOS v4.2.1). I put the iPod aside and decided to come back to it later. Well today was later.

After playing around getting the app ready to submit to the app store I discovered that the same issue was appearing on my iPhone. After futzing around with it for a little bit I realized that I had deleted the “Main nib file base name (iPhone)” key from the application’s plist file. I restored the setting telling the app to launch “MainWindow_iPhone” and all was well but that got me thinking that maybe I didn’t test this properly on the iPod. I tried launching the app on the iPod and still no dice. I figured I was on the right track so for fun I added the “Main nib file base name” key into the plist file and set it to “MainWindow_iPhone”.

MAGIC!

So the end result is the app works on all devices now and I have three “Main nib file” keys in my plist. One for iPad, one for iPhone and one generic one.

Advertisements

Ad-Hoc App Distribution with XCode 4


Update (12-02-2011): The process of deploying to the app store was fairly simple using this new archive process. The only catch was editing the scheme to change the Archive option to use the AppStore code signing identity and using the Submit button instead of Share. Check out the app in the iTunes AppStore – Autograph This!

So amongst the many nice features in XCode 4 comes the modified process for building your app for distribution. And with “The Google” not being entirely helpful about the process as well as the docs on the Apple developer site still containing the XCode 3 instructions I thought it would help at least somebody out there for me to document the process. Please note that since I haven’t built one yet for distribution to the app store this just covers ad-hoc distribution. Maybe I’ll update this when we release to the app store.

Interacting with the provisioning portal hasn’t changed. You still need to create your distribution profile and download it to your development machine. Once you’ve done that is where the process has changed.

Read more of this post

Water ripple effect on an HTML5 canvas


It’s a nice demo of what is possible with HTML5 but still lacks in performance. At least on my laptop.

http://code.almeros.com/code-examples/water-effect-canvas/

Badass JavaScript: Face Detection in JavaScript via HTML5 Canvas


Badass JavaScript: Face Detection in JavaScript via HTML5 Canvas

badassjs:

You have probably seen face detection at work in programs like iPhoto and Picasa, but what if you could do that performantly in JavaScript? Chinese developer Liu Liu has done the honors, and implemented the algorithm using the canvas element.

The algorithm is implemented on top of a JS port of a…

How to Retrieve Your Application’s Version Number in Android


It’s sad that I even need to post this but I find it increasingly difficult to search for answers to Android SDK questions. All I wanted to do was display the application version in the about screen. This one took me 3 pages of Google results to get to the answer. I swear I know how to search but for some reason googling the Android SDK flummoxes me.

It’s only two lines of code:

PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
String version = packageInfo.versionName;

You do have to catch a NameNotFoundException but that’s it. If you found this somewhere in the first 5 pages of Google search results then congratulations, you just saved 10 minutes of wading through useless and/or unrelated pages.

Sweet CSS3 Glass Effect


Check it out:
http://lab.simurai.com/css/glass/

HTML5 Is Here So You’d Best Be Prepared


Here’s a link to some great examples of HTML5 at work (Webification):

http://webification.com/15-excellent-html5-techniques-and-demonstrations

HTML5 is going to become running theme here since I’m taking some significant time at home to learn how to implement it. And also it is awesome.