File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Edit your `Package.swift`
33
33
34
34
``` swift
35
35
// add this repo to dependencies
36
- .package (url : " https://github.com/MihaelIsaev/FCM.git" , from : " 0.4.1 " )
36
+ .package (url : " https://github.com/MihaelIsaev/FCM.git" , from : " 0.5.0 " )
37
37
// and don't forget about targets
38
38
// "FCM"
39
39
```
@@ -93,6 +93,18 @@ services.register(fcm, as: FCM.self)
93
93
>
94
94
> 🔑 Just go to Settings -> Service Accounts tab and press ** Create Private Key** button in e.g. NodeJS tab
95
95
96
+ #### OPTIONAL: Set default configurations, e.g. to enable notification sound
97
+ Add the following code to your ` configure.swift `
98
+ ``` swift
99
+ fcm.apnsDefaultConfig = FCMApnsConfig (headers : [: ],
100
+ aps : FCMApnsApsObject (sound : " default" ))
101
+ fcm.androidDefaultConfig = FCMAndroidConfig (ttl : " 86400s" ,
102
+ restricted_package_name : " com.example.myapp" ,
103
+ notification : FCMAndroidNotification (sound : " default" ))
104
+ fcm.webpushDefaultConfig = FCMWebpushConfig (headers : [: ],
105
+ data : [: ],
106
+ notification : [: ])
107
+ ```
96
108
#### Let's send first push notification! 🚀
97
109
98
110
Then you could send push notifications using token, topic or condition.
You can’t perform that action at this time.
0 commit comments