Updated first sample code for iOS