Move VFS Activation at earlier stage in service notification

This commit is contained in:
Christophe Deschamps 2021-06-16 21:26:51 +02:00
parent c90658d1ac
commit 82cb8660d7

View file

@ -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) {