You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
37
37
1. Create or open your project inside Xcode.
38
38
2. Navigate to **File -> Add Package Dependencies**.
39
39
3. Search for `https://github.com/pubnub/swift-chat-sdk`
40
-
4. From the **Dependency Rule** drop-down list, select **Exact**. In the version input field, type `0.10.0-dev`
40
+
4. From the **Dependency Rule** drop-down list, select **Exact**. In the version input field, type `0.10.1-dev`
41
41
5. Click the **Add Package** button.
42
42
43
43
For more information see Apple's guide on [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)
Copy file name to clipboardExpand all lines: Sources/Chat.swift
+7-14Lines changed: 7 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,18 @@ public protocol Chat: AnyObject {
35
35
varpubNub:PubNub{get}
36
36
/// Object representing current user
37
37
varcurrentUser:ChatUserType{get}
38
-
/// The name of the action that represents editing a message
38
+
/// A type of action added to your Message object whenever a published message is edited, like "changed" or "modified". The default value is "edited"
39
39
vareditMessageActionName:String{get}
40
-
/// The name of the action that represents deleting a message
40
+
/// A type of action added to your Message object whenever a published message is deleted, like "removed". The default value is "deleted"
41
41
vardeleteMessageActionName:String{get}
42
+
/// A type of action you added to your Message object whenever a reaction is added to a published message, like "reacted". The default value is "reactions"
43
+
varreactionsActionName:String{get}
42
44
43
45
/// Initializes the current instance and performs any necessary setup.
44
46
///
47
+
/// This method must be called before invoking any other operations
48
+
/// in order to ensure the SDK is properly initialized.
49
+
///
45
50
/// - Parameters:
46
51
/// - completion: The async `Result` of the method call
47
52
/// - **Success**: The initialization succeeded and returns the instance
@@ -50,18 +55,6 @@ public protocol Chat: AnyObject {
50
55
completion:((Swift.Result<Self,Error>)->Void)?
51
56
)
52
57
53
-
/// Creates a new user.
54
-
///
55
-
/// - Parameters:
56
-
/// - user: A `User` object containing the details of the user to be created.
57
-
/// - completion: The async `Result` of the method call
58
-
/// - **Success**: The user was successfully created and returns the created user
59
-
/// - **Failure**: An `Error` describing the failure
Copy file name to clipboardExpand all lines: Sources/ChatConfiguration.swift
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -39,21 +39,21 @@ public class CustomPayloads {
39
39
/// If you wish to bypass the custom mapping (e.g. for certain channels), you can fall back to the default by calling the third parameter - `DefaultGetMessageResponseBody` and returning its result
40
40
/// Define `getMessagePublishBody` whenever you use `getMessageResponseBody`
41
41
vargetMessageResponseBody:GetMessageResponseBody?
42
-
/// A name of action to add to your Message object whenever a published message is edited
42
+
/// A type of action to add to your Message object whenever a published message is edited
43
43
vareditMessageActionName:String?
44
-
/// A name of action to add to your Message object whenever a published message is edited
44
+
/// A type of action to add to your Message object whenever a published message is edited
45
45
vardeleteMessageActionName:String?
46
-
/// A name of action to add to your Message object whenever a reaction is added
46
+
/// A type of action to add to your Message object whenever a reaction is added
47
47
varreactionsActionName:String?
48
48
49
49
/// Creates a new ``CustomPayloads`` object.
50
50
///
51
51
/// - Parameters:
52
52
/// - getMessagePublishBody: Function that lets Chat SDK send your custom payload structure
53
53
/// - getMessageResponseBody: Function that lets Chat SDK receive your custom payload structure
54
-
/// - editMessageActionName: A name of action to add to your Message object whenever a published message is edited, like "changed" or "modified. The default value is `"edited"`
55
-
/// - deleteMessageActionName: A name of action to add to your Message object whenever a published message is deleted, like "removed". The default value is `"deleted"`
56
-
/// - reactionsActionName: A name of action to add to your Message object whenever a reaction is added. The default value is `"reactions"`
54
+
/// - editMessageActionName: If present, overrides the default action type to be added to your Message object whenever a published message is edited
55
+
/// - deleteMessageActionName: If present, overrides the default action type to be added to your Message object whenever a published message is deleted
56
+
/// - reactionsActionName: If present, overrides the default action type to be added to your Message object whenever a reaction is added
@@ -158,7 +158,7 @@ public struct ChatConfiguration {
158
158
/// Specifies how often the user global presence in the app should be updated. Requires `storeUserActivityTimestamps`
159
159
/// to be set to true. The minimum possible value is 60 seconds. If you try to set it to a lower value, you'll get the storeUserActivityInterval must be at least 60000ms error
160
160
publicvarstoreUserActivityInterval:Int
161
-
/// Specifies if you want to track the user's global presence in your chat app. The user's activity is tracked through `user.lastActiveTimestamp`
161
+
/// Specifies if you want to track the user's global presence in your chat app. The user's activity is tracked through ``User/lastActiveTimestamp``
162
162
publicvarstoreUserActivityTimestamps:Bool
163
163
/// List of parameters you must set if you want to enable sending/receiving mobile push notifications for phone devices, either through Apple Push Notification service (APNS) or Firebase Cloud Messaging (FCM)
@@ -229,7 +229,11 @@ public struct ChatConfiguration {
229
229
/// Defines the list of parameters you must set if you want to enable sending/receiving mobile push notifications for phone devices,
230
230
/// either through Apple Push Notification service (APNS) or Firebase Cloud Messaging (FCM).
231
231
publicstructPushNotificationsConfig{
232
-
/// The main option for enabling sending notifications
232
+
/// The main option for enabling sending notifications. It must be set to `true` if you want a particular client (whether a mobile device, web browser, or server) to send
233
+
/// push notifications to mobile devices.
234
+
///
235
+
/// These push notifications are messages with a provider-specific payload that the Chat SDK automatically attaches to every message.
236
+
/// Chat SDK includes a default payload setup for ``deviceGateway`` in every message sent to the registered channels.
233
237
publicvarsendPushes:Bool
234
238
/// Refers to the unique identifier assigned to a specific mobile device by a platform's push notification service
Copy file name to clipboardExpand all lines: Sources/MessageDraft/MessageDraft.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,8 @@ public protocol MessageDraft {
62
62
/// Insert mention into the ``MessageDraft`` according to ``SuggestedMention/offset``, ``SuggestedMention/replaceFrom`` and ``SuggestedMention/target``.
63
63
///
64
64
/// - Parameters:
65
-
/// - mention: A ``SuggestedMention`` that can be obtained from ``MessageDraftStateListener``
66
-
/// - text: The text to replace ``SuggestedMention/replaceFrom`` with. ``SuggestedMention/replaceTo`` can be used for example
65
+
/// - mention: A ``SuggestedMention`` that can be obtained from ``MessageDraftChangeListener``
66
+
/// - text: The text to replace ``SuggestedMention/replaceFrom`` with. ``SuggestedMention/replaceWith`` can be used for example
0 commit comments