iPhone sample and test codes