change the notification registering code for ios8