FIX: abandonPermissions was undefined

This commit is contained in:
Marcos Rodriguez Velez 2024-03-07 19:00:31 -04:00
parent 1f90b6e659
commit ca016d89bf
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
2 changed files with 8 additions and 3 deletions

View File

@ -5,8 +5,8 @@ import { getApplicationName, getVersion, getSystemName, getSystemVersion, hasGms
import AsyncStorage from '@react-native-async-storage/async-storage';
import loc from '../loc';
import { requestNotifications } from 'react-native-permissions';
import PushNotification from 'react-native-push-notification';
const PushNotification = require('react-native-push-notification');
const constants = require('./constants');
const PUSH_TOKEN = 'PUSH_TOKEN';
const GROUNDCONTROL_BASE_URI = 'GROUNDCONTROL_BASE_URI';
@ -245,7 +245,9 @@ function Notifications(props) {
},
}),
);
Notifications.abandonPermissions();
console.log('Abandoning notifications Permissions...');
PushNotification.abandonPermissions();
console.log('Abandoned notifications Permissions...');
return postCall;
};
@ -324,6 +326,9 @@ function Notifications(props) {
},
}),
);
console.log('Abandoning notifications Permissions...');
PushNotification.abandonPermissions();
console.log('Abandoned notifications Permissions...');
} catch (_) {}
};

View File

@ -48,7 +48,7 @@
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"