From 82cb8660d7a905eb8fff2aa1ceafc741a05566dc Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Wed, 16 Jun 2021 21:26:51 +0200 Subject: [PATCH] Move VFS Activation at earlier stage in service notification --- msgNotificationService/NotificationService.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index f1bc77966..83858998d 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -56,6 +56,10 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) NSLog("[msgNotificationService] start msgNotificationService extension") + if (VFSUtil.vfsEnabled(groupName: APP_GROUP_ID) && !VFSUtil.activateVFS()) { + VFSUtil.oslog(log: "[VFS] Error unable to activate.", level: .error) + } + if let bestAttemptContent = bestAttemptContent { createCore() NotificationService.log.message(message: "received push payload : \(bestAttemptContent.userInfo.debugDescription)") @@ -183,10 +187,6 @@ class NotificationService: UNNotificationServiceExtension { func createCore() { NSLog("[msgNotificationService] create core") - if (VFSUtil.vfsEnabled(groupName: APP_GROUP_ID) && !VFSUtil.activateVFS()) { - VFSUtil.oslog(log: "[VFS] Error unable to activate.", level: .error) - } - let config = Config.newForSharedCore(appGroupId: APP_GROUP_ID, configFilename: "linphonerc", factoryConfigFilename: "") if (NotificationService.log == nil) {