Something Ill-Considered

So once upon a time, I added a set of files to a Visual Studio project, each named “lv_x.wav” where x is number. Yet for some reason, my app wouldn’t play the sounds. However, it would still play “alert.wav”. Puzzled, I tried renaming “lv_3.wav” to “alert.wav”, and it played. And then when I renamed it back to “lv_3.wav” again, voila! It played.

Cursing VS, I manually renamed each file to itself to work around what was clearly an idiotic bug, and promptly forgot about the whole episode.

One month later, I added “lv_11.wav” to an Xcode project. Yet I ran into a similar issue:

NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"lv_11" ofType: @"wav"];

kept returning null. I pored over the documentation, and saw that if I substituted an asterisk in pathForResource, the OS would return the first file it found of that type. And sure enough, that worked — it returned the full path to

/Users/a/Library/Application Support/iPhone Simulator/7.0.3/Applications/6DDDDDDD1-E2C9-409D-984C-465EEAA4604E/TestApp.app/Iv_11.wav

Huh. That’s weird. It thinks the ell is an… I…?

Oh.

Damn you, sans serif uppercase I and lowercase l. Damn you to hell.

When my collaborator sent me the files in DropBox, I had thought the prefix was random. But in retrospect, I should’ve made the connection to her name: Ivory.

Mmyeah. Duh.