We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b9d0a7 + 5426235 commit 814bd6fCopy full SHA for 814bd6f
content/push/publish.textile
@@ -1193,6 +1193,25 @@ channel = realtime.channels.get('pushenabled:foo');
1193
channel.publish(message);
1194
```
1195
1196
+```[realtime_swift]
1197
+let extras = ["push": [
1198
+ "notification": [
1199
+ "title": "Hello from Ably!",
1200
+ "body": "Example push notification from Ably!"
1201
+ ]
1202
+]] as any ARTJsonCompatible
1203
+
1204
+let message = ARTMessage(name: "name", data: "data")
1205
+message.extras = extras
1206
1207
+let channel = realtime.channels.get("pushenabled:foo")
1208
+channel.publish([message]) { error in
1209
+ if let error = error {
1210
+ print("Error publishing message: \(error)")
1211
+ }
1212
+}
1213
+```
1214
1215
```[rest_javascript]
1216
var extras = {
1217
push: {
0 commit comments