Akamai Haole

Aloha!      Welcome!      Howdy!
Programming

Coding Together iOS Course

I’m joining the Coding Together event, to learn iOS programming through Paul Hegarty’s Stanford University computer science course. Come join in!

Coding Together: Apps for iPhone and iPad

Wireless distribution of ad-hoc builds

Finally, iOS 4 brings wireless distribution of iOS ad-hoc builds to devices that are pre-registered.

Verifying a file’s SHA1 hash on OS X

I frequently have to verify a file’s SHA1 hash, to ensure that the file downloaded correctly and has not been tampered with.  While you can visually inspect the hash result to compare it to a known value, I find it very handy to have a script that does this for me, given a filename and a known valid hash.

#!/bin/bash

#
# Script to validate a SHA1 hash on a file
# Copyright (c)2011, Akamai Haole, LLC
#
# Usage: verifySHA1
#

# Executable paths
AWK=/usr/bin/awk
OPENSSL=/opt/local/bin/openssl

# Parameter sanity check
if [ "${1}x" == "x" -o "${2}x" == "x" ]; then
   echo ""
   echo "Usage: ${0} "
   echo ""
   exit
fi

# File existence sanity check
if [ ! -f "${2}" ]; then
   echo ""
   echo "ERROR: File (${2}) does not exist!"
   echo ""
   exit
fi

# Calculate SHA1 hash value and trim it
SHA1_HASH_VALUE=`${OPENSSL} sha1 ${2} | ${AWK} 'BEGIN {FS="="}; {gsub(/ /,"",$2); print $2}'`

# File information
echo ""
echo "File path: ${2}"
echo "Calculated SHA1 hash: ${SHA1_HASH_VALUE}"
echo ""

# Test with the SHA1 hash that was passed in
if [ "${SHA1_HASH_VALUE}x" != "${1}x" ]; then
   echo "Hash comparison fails!"
else
   echo "Hash comparison matches."
fi

echo ""

# End of script

Getting your app into the Mac App Store

http://furbo.org/2011/03/09/mac-app-store-guide/

Good intro to iOS programming

http://designthencode.com/scratch/

Jeff LaMarche’s presentation slides from Voices that Matter

iPhone Development: Presentation Slides.

OpenGL ES 2.0 for iOS, Chapter 4 now available

iPhone Development: OpenGL ES 2.0 for iOS, Chapter 4 – Introducing the Programmable Pipeline.

And, like that, Chapter 3 is upon us

iPhone Development: OpenGL ES 2.0 for iOS, Chapter 3 – Fundamentals of 3D Programming.

Interesting discussion of outlets in Cocoa vs Cocoa Touch

‘I almost always follow Apple’s lead on Cocoa and Cocoa Touch conventions. I figure that by the time outside developers like me see something for the first time, Apple engineers have been living with that thing for many months, so they’ve likely got a much better idea than I do about the best way to use that new thing.
But, after spending time with their stuff, sometimes — not often, but sometimes — I disagree with what appears to be Apple’s recommended “best practice” for doing something. I think I’ve come to the decision that the IBOutlet behavior in iOS is one of these areas.’
via
iPhone Development: Outlets, Cocoa vs. Cocoa Touch.

Intro to Open GL ES programming for iOS

Jeff LaMarche has begun posting chapters from his book on Open GL ES programming in the iOS environment.  The first two chapters are now online:
Chapter 1
Chapter 2

Xcode 4 Developer Preview released to all paid developers

Gonna have to try this out:  http://developer.apple.com/technologies/tools/whats-new.html

Siracusa’s view on the future of Apple’s development environment

Some good points about Objective-C’s future:  http://arstechnica.com/apple/news/2010/06/copland-2010-revisited.ars/

A look into the iOS hardware

Good article on the hardware that runs iOS: http://wanderingcoder.net/2010/07/19/ought-arm/
I learned something new: “Notice the simulator does not execute ARM code, when building for the simulator your app is compiled for x86 and executes natively, so none of the following applies when running on the simulator, you need to be running on target.”