Tag Archives: iPhone

git version sha in iOS apps

there’s tons of recipes out there how to do this – nevertheless I want to add another one: create a new build phase (here named „Git Sha -> Info.plist“) paste 1 2 3 4 5 6 7 8 # write git version SHA into Info.plist # # inspired by # – http://kswizz.com/post/2686511526/git-xcode-versioning # – http://stackoverflow.com/a/12658311 […]

Rank sql(ite) text search results

When searching for text snippets in sql databases you might want to rank the results according to „how good did it match“. And: the ranking shouldn’t make the query slower. Let’s take a simple example using the LIKE operator. (I know, FTS does a better job, but let’s stick to like for now). Assume the […]

Vortrag: Index Suche mit CoreData und SQLite

Gestern gab’s einen Mini-Vortrag von mir bei den CocoaHeads München: CoreData (iOS) ist nur mit Tricks dazu zu bringen den Index bei Textsuche zu benutzen, SQLite Full Text Search (FTS) ist der Hammer. Die Folien dazu.

AlcoCalc iPhone App online!

Hurra! Vor einigen Tagen ist die erste Version des Promillerechners im erschienen. Die App merkt sich was Du wann getrunken hast und schätzt nach der Widmark Formel grob den aktuellen und fallenden Promillewert ab: .

High-Res UIImage remote load

Loading UIImages automatically in high-resolution works fine for locally stored images – but if you want to fetch them via remote URL you have to code yourself. A simple, blocking but backward compatible (iOS >= 3.0, maybe even 2.0 but untested)  implementation could look like this: 1 2 3 4 5 6 7 8 9 […]

High-Res Artwork Management Automation

The iPhone4 comes with a super high-res display and to leverage that encourages App Developers to provide all artwork twofold – once „normal“ and once in double resolution named equally with a „@2x“ suffix. To ease my designers‘ life and avoid confusion (and designers are easily confused I found) I ask them to provide the […]

Upgrade iOS SDK 4.0 -> 4.1 with custom location

again, for my custom install location I need to prepare: cleanly uninstall and remove cruft: $ dir=/Users/Developer.SnowLeopard $ sudo sh $dir/Library/uninstall-devtools $ sudo rm -r $dir/* $ sudo mv /Developer /Developer.deleteme$ dir=/Users/Developer.SnowLeopard $ sudo sh $dir/Library/uninstall-devtools $ sudo rm -r $dir/* $ sudo mv /Developer /Developer.deleteme then do the custom-location install and finally restore some […]

Vortrag: Parser mit Ragel

Parser mit Ragel – komplizierte Grammatiken und rattenschnelles XML. Warum Parser bauen? Was spricht gegen Ad-Hoc Parsing (a.k.a. Gefrickel)? Quelltext Impression Wie komme ich drauf? Anschnallen: Die Bausteine Beispiel: SVG Path Parser Beispiel: XML Parser Ausblick: Zustandsautomaten Vielen Dank Die Folien vom Vortrag am 22. September bei den CocoaHeads München.

UILabel with a (custom) CGFont

UILabel’s font property accepts UIFonts – but strange enough there’s no way to get a custom loaded CGFont (from a ttf or otf file) converted into such an UIFont. You’re stuck with the iPhone’s pre-installed fonts – at least when you have to support iOS 3.0 devices. After googling a bit and searching Stackoverflow I found […]

Develop with iOS 4 SDK on an OS 3.0 Device

After upgrading to iOS 4.0 SDK, iPhone OS 3.0 is no longer a valid „Base SDK“. Naively switching to iPhone 3.2 prevents deployment to a 3.0 device. But such „Project -> Edit Project Settings“ work out fine: „Deployment Target“ hint found here.