updating user device token and starting implementation for sending push notification device to device

This commit is contained in:
talksik
2021-12-23 01:26:30 -08:00
parent 5a63eba4a5
commit 09a3f2b0bb
7 changed files with 90 additions and 8 deletions
@@ -20,6 +20,7 @@ class InnerCircleViewModel: ObservableObject {
let cloudStorageService = CloudStorageService()
let firestoreService = FirestoreService()
let pushNotificationService = pushNotificationService()
init() {
do {
@@ -77,6 +78,8 @@ class InnerCircleViewModel: ObservableObject {
self?.firestoreService.createMessage(message: newMessage) {[weak self] res in
print(res)
// sending push notification
// delete local audio file from user's phone so that it doesn't get crazy
print("stopped recording: file about to get deleted from \(self?.getTemporaryDirectory()) with filename: \(self?.audioLocalUrl)")