Update to support IOS 7.1 and later

Code update.