Updates for Xcode 5 and iOS7

These changes will allow the sample code to compile in Xcode 5 and run in iOS7