Fix flexiApi push parameter for push token reception : need to adapt the pn-provider to the build (DEBUG or not)

This commit is contained in:
QuentinArguillere 2024-08-13 11:24:35 +02:00
parent 69a878d245
commit bd3b8d8731

View file

@ -314,7 +314,12 @@ class RegisterViewModel: ObservableObject {
let pushConfig = core.pushNotificationConfig
if pushConfig != nil && self.accountManagerServices != nil {
pushConfig!.provider = "apns.dev"
#if DEBUG
let pushEnvironment = ".dev"
#else
let pushEnvironment = ""
#endif
pushConfig!.provider = "apns\(pushEnvironment)"
var formatedPnParam = pushConfig!.param
formatedPnParam = formatedPnParam?.replacingOccurrences(of: "voip&remote", with: "remote")
pushConfig!.param = formatedPnParam