Register notification in iOS8

Adapt to iOS8 platform to avoid the following error:
registerForRemoteNotificationTypes has been depreciated and removed from iOS 8