Bringing project upt o speed with iOS 8.

This will remove deprecation warnings.