Updated example for iOS.