Allow push notifications in the app, and update account and core settings to allow VOIP push parameters generation for register

This commit is contained in:
QuentinArguillere 2023-12-10 11:08:21 +01:00
parent 76b7681bf4
commit 2a1bd88741
4 changed files with 14 additions and 0 deletions

View file

@ -86,6 +86,8 @@ final class CoreContext: ObservableObject {
self.mCore.autoIterateEnabled = false
self.mCore.friendsDatabasePath = "\(configDir)/friends.db"
self.mCore.callkitEnabled = true
self.mCore.pushNotificationEnabled = true
self.mCore.friendListSubscriptionEnabled = true

View file

@ -11,6 +11,11 @@
<string>NotoSans-Bold.ttf</string>
<string>NotoSans-ExtraBold.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>voip</string>
</array>
<key>UILaunchScreen</key>
<dict>
<key>UIImageName</key>

View file

@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.aps-environment</key>
<string>development</string>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>

View file

@ -89,6 +89,9 @@ class AccountLoginViewModel: ObservableObject {
try accountParams.setServeraddress(newValue: address)
// And we ensure the account will start the registration process
accountParams.registerEnabled = true
accountParams.pushNotificationAllowed = true
accountParams.remotePushNotificationAllowed = false
accountParams.pushNotificationConfig?.provider = "apns.dev"
// Now that our AccountParams is configured, we can create the Account object
let account = try core.createAccount(params: accountParams)