Added sample code.
Now runs on iPhone.