Code for IOS App.