Update the sample to work with the changes in iOS8.