Improved iOS Sample