React native 在React Native上手动禁用iPhone设置后,如何检测PushNotificationIOS状态?

React native 在React Native上手动禁用iPhone设置后,如何检测PushNotificationIOS状态?,react-native,push-notification,permissions,React Native,Push Notification,Permissions,在手机设置上手动禁用推送通知后,不会触发该代码 PushNotificationIOS.addEventListener('register', (deviceToken) => { console.log('PushNotificationIOS.register,-------', deviceToken); }); PushNotificationIOS.addEventListener('registrationError', (response) =&g

在手机设置上手动禁用推送通知后,不会触发该代码

PushNotificationIOS.addEventListener('register', (deviceToken) => {
    console.log('PushNotificationIOS.register,-------', deviceToken);
        });

PushNotificationIOS.addEventListener('registrationError', (response) => {
            console.log('PushNotificationIOS.registrationError,=====', response);
        });
因此,我无法检测远程通知是否已禁用。

您可以从PushNotificationIOS使用,它返回如下对象:

{"alert":1,"badge":1,"sound":1}