iOS utilities and demo code