Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b7bc43d
WIP
jguz-pubnub Dec 13, 2024
070d617
WIP
jguz-pubnub Dec 18, 2024
e3468dd
WIP
jguz-pubnub Dec 18, 2024
6a42cd6
WIP
jguz-pubnub Dec 19, 2024
6ed0d13
WIP
jguz-pubnub Dec 19, 2024
2c8c2e6
WIP
jguz-pubnub Dec 19, 2024
87f37cc
WIP
jguz-pubnub Dec 19, 2024
acb2410
WIP
jguz-pubnub Dec 19, 2024
276ed3e
WIP
jguz-pubnub Dec 20, 2024
b17ef0e
Channel integration tests
jguz-pubnub Jan 2, 2025
5b3f88b
Integration tests
jguz-pubnub Jan 2, 2025
65ad295
Integration tests
jguz-pubnub Jan 3, 2025
79dc08d
Integration tests
jguz-pubnub Jan 3, 2025
d227d1e
SwiftFormat
jguz-pubnub Jan 3, 2025
c94d8a6
Integration tests
jguz-pubnub Jan 7, 2025
1d57a71
Integration tests
jguz-pubnub Jan 7, 2025
91d698b
Integration tests
jguz-pubnub Jan 7, 2025
1168827
Integration tests (2)
jguz-pubnub Jan 7, 2025
bf03179
Move all tests to the new Test Plan
jguz-pubnub Jan 8, 2025
6bd9d85
Switch to the new Test Plan
jguz-pubnub Jan 8, 2025
80cc744
Async-await extension for FutureObject
jguz-pubnub Jan 22, 2025
21c236a
Merge branch 'master' into feat/async-await
jguz-pubnub Jan 28, 2025
856ed18
Minor fixes
jguz-pubnub Jan 28, 2025
2c8d26b
SwiftFormat + SwiftLint
jguz-pubnub Jan 28, 2025
af4e593
Fixes according to review
jguz-pubnub Jan 31, 2025
e036c7d
Minor improvements
jguz-pubnub Mar 17, 2025
9b6bf2b
Merge branch 'master' into feat/async-await
jguz-pubnub Mar 18, 2025
60c4ba6
DocC
jguz-pubnub Mar 18, 2025
5f1c61a
Merge branch 'master' into feat/async-await
jguz-pubnub Mar 24, 2025
a5fdd9b
Added explanation in methods returning AutoCloseable
jguz-pubnub Mar 24, 2025
75ed182
Changes
jguz-pubnub Mar 24, 2025
13e8bce
Codacy
jguz-pubnub Mar 24, 2025
51cc793
PubNub SDK 0.20.0 release.
pubnub-release-bot Mar 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
environment: [iOS]
timeout-minutes: 18
timeout-minutes: 21
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ disabled_rules:
- function_parameter_count
included:
- Sources/
excluded:
- Tests/
opt_in_rules:
- force_unwrapping
- overridden_super_call
Expand Down
237 changes: 224 additions & 13 deletions PubNubSwiftChatSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Tests/PubNubSwiftChatSDKTests.xctestplan"
reference = "container:Tests/PubNubSwiftChatSDKAsyncTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3D46D4552D131EB2007D08DB"
BuildableName = "PubNubSwiftChatSDKAsyncTests.xctest"
BlueprintName = "PubNubSwiftChatSDKAsyncTests"
ReferencedContainer = "container:PubNubSwiftChatSDK.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
35 changes: 34 additions & 1 deletion PubNubSwiftChatSDK/PubNubSwiftChatSDK.docc/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,112 @@

### Receiving Updates

- ``streamUpdates()``
- ``streamUpdates(callback:)``
- ``streamUpdatesOn(channels:)``
- ``streamUpdatesOn(channels:callback:)``
- ``streamReadReceipts()``
- ``streamReadReceipts(callback:)``
- ``streamMessageReports()``
- ``streamMessageReports(callback:)``
- ``streamPresence()``
- ``streamPresence(callback:)``

### Update and Delete a Channel

- ``update(name:custom:description:status:type:)``
- ``update(name:custom:description:status:type:completion:)``
- ``delete(soft:)``
- ``delete(soft:completion:)``

### Typing Indicator

- ``startTyping()``
- ``startTyping(completion:)``
- ``stopTyping()``
- ``stopTyping(completion:)``
- ``getTyping()``
- ``getTyping(callback:)``

### Presence Management

- ``whoIsPresent()``
- ``whoIsPresent(completion:)``
- ``isPresent(userId:)``
- ``isPresent(userId:completion:)``
- ``join(custom:)``
- ``join(custom:callback:completion:)``
- ``leave()``
- ``leave(completion:)``
- ``streamPresence()``
- ``streamPresence(callback:)``

### Memberships Management

- ``invite(user:)``
- ``invite(user:completion:)``
- ``inviteMultiple(users:)``
- ``inviteMultiple(users:completion:)``
- ``getMembers(limit:page:filter:sort:)``
- ``getMembers(limit:page:filter:sort:completion:)``

### Sending a text

- ``InputFile``
- ``sendText(text:meta:shouldStore:usePost:ttl:mentionedUsers:referencedChannels:textLinks:quotedMessage:files:completion:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:quotedMessage:files:usersToMention:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:quotedMessage:files:usersToMention:completion:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:mentionedUsers:referencedChannels:textLinks:quotedMessage:files:completion:)``

### Creating Message Draft

- ``createMessageDraft(userSuggestionSource:isTypingIndicatorTriggered:userLimit:channelLimit:)``

### Messages Management

- ``connect()``
- ``connect(callback:)``
- ``forward(message:)``
- ``forward(message:completion:)``
- ``getHistory(startTimetoken:endTimetoken:count:)``
- ``getHistory(startTimetoken:endTimetoken:count:completion:)``
- ``getMessage(timetoken:)``
- ``getMessage(timetoken:completion:)``

### Pinning and Unpinning a Message

- ``pinMessage(message:)``
- ``pinMessage(message:completion:)``
- ``unpinMessage()``
- ``unpinMessage(completion:)``
- ``getPinnedMessage()``
- ``getPinnedMessage(completion:)``

### Push Management

- ``registerForPush()``
- ``registerForPush(completion:)``
- ``unregisterFromPush()``
- ``unregisterFromPush(completion:)``

### Delete a File

- ``deleteFile(id:name:)``
- ``deleteFile(id:name:completion:)``

### Getting Files

- ``GetFileItem``
- ``getFiles(limit:next:)``
- ``getFiles(limit:next:completion:)``

### User Suggestions

- ``getUserSuggestions(text:limit:)``
- ``getUserSuggestions(text:limit:completion:)``

### Message Reports

- ``getMessageReportsHistory(startTimetoken:endTimetoken:count:)``
- ``getMessageReportsHistory(startTimetoken:endTimetoken:count:completion:)``
- ``streamMessageReports()``
- ``streamMessageReports(callback:)``
35 changes: 34 additions & 1 deletion PubNubSwiftChatSDK/PubNubSwiftChatSDK.docc/ChannelImpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,112 @@

### Receiving Updates

- ``streamUpdates()``
- ``streamUpdates(callback:)``
- ``streamUpdatesOn(channels:)``
- ``streamUpdatesOn(channels:callback:)``
- ``streamReadReceipts()``
- ``streamReadReceipts(callback:)``
- ``streamMessageReports()``
- ``streamMessageReports(callback:)``
- ``streamPresence()``
- ``streamPresence(callback:)``

### Update and Delete a Channel

- ``update(name:custom:description:status:type:)``
- ``update(name:custom:description:status:type:completion:)``
- ``delete(soft:)``
- ``delete(soft:completion:)``

### Typing Indicator

- ``startTyping()``
- ``startTyping(completion:)``
- ``stopTyping()``
- ``stopTyping(completion:)``
- ``getTyping()``
- ``getTyping(callback:)``

### Presence Management

- ``whoIsPresent()``
- ``whoIsPresent(completion:)``
- ``isPresent(userId:)``
- ``isPresent(userId:completion:)``
- ``join(custom:)``
- ``join(custom:callback:completion:)``
- ``leave()``
- ``leave(completion:)``
- ``streamPresence()``
- ``streamPresence(callback:)``

### Memberships Management

- ``invite(user:)``
- ``invite(user:completion:)``
- ``inviteMultiple(users:)``
- ``inviteMultiple(users:completion:)``
- ``getMembers(limit:page:filter:sort:)``
- ``getMembers(limit:page:filter:sort:completion:)``

### Sending a text

- ``InputFile``
- ``sendText(text:meta:shouldStore:usePost:ttl:mentionedUsers:referencedChannels:textLinks:quotedMessage:files:completion:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:quotedMessage:files:usersToMention:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:quotedMessage:files:usersToMention:completion:)``
- ``sendText(text:meta:shouldStore:usePost:ttl:mentionedUsers:referencedChannels:textLinks:quotedMessage:files:completion:)``

### Creating Message Draft

- ``createMessageDraft(userSuggestionSource:isTypingIndicatorTriggered:userLimit:channelLimit:)``

### Messages Management

- ``connect()``
- ``connect(callback:)``
- ``forward(message:)``
- ``forward(message:completion:)``
- ``getHistory(startTimetoken:endTimetoken:count:)``
- ``getHistory(startTimetoken:endTimetoken:count:completion:)``
- ``getMessage(timetoken:)``
- ``getMessage(timetoken:completion:)``

### Pinning and Unpinning a Message

- ``pinMessage(message:)``
- ``pinMessage(message:completion:)``
- ``unpinMessage()``
- ``unpinMessage(completion:)``
- ``getPinnedMessage()``
- ``getPinnedMessage(completion:)``

### Push Management

- ``registerForPush()``
- ``registerForPush(completion:)``
- ``unregisterFromPush()``
- ``unregisterFromPush(completion:)``

### Delete a File

- ``deleteFile(id:name:)``
- ``deleteFile(id:name:completion:)``

### Getting Files

- ``GetFileItem``
- ``getFiles(limit:next:)``
- ``getFiles(limit:next:completion:)``

### User Suggestions

- ``getUserSuggestions(text:limit:)``
- ``getUserSuggestions(text:limit:completion:)``

### Message Reports

- ``getMessageReportsHistory(startTimetoken:endTimetoken:count:)``
- ``getMessageReportsHistory(startTimetoken:endTimetoken:count:completion:)``
- ``streamMessageReports()``
- ``streamMessageReports(callback:)``
26 changes: 26 additions & 0 deletions PubNubSwiftChatSDK/PubNubSwiftChatSDK.docc/Chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,56 @@

### Initializing a Chat instance

- ``initialize()``
- ``initialize(completion:)``

### Working with Conversations

- ``CreateDirectConversationResult``
- ``CreateGroupConversationResult``
- ``createDirectConversation(invitedUser:channelId:channelName:channelDescription:channelCustom:channelStatus:membershipCustom:)``
- ``createDirectConversation(invitedUser:channelId:channelName:channelDescription:channelCustom:channelStatus:membershipCustom:completion:)``
- ``createGroupConversation(invitedUsers:channelId:channelName:channelDescription:channelCustom:channelStatus:membershipCustom:)``
- ``createGroupConversation(invitedUsers:channelId:channelName:channelDescription:channelCustom:channelStatus:membershipCustom:completion:)``
- ``createPublicConversation(channelId:channelName:channelDescription:channelCustom:channelStatus:)``
- ``createPublicConversation(channelId:channelName:channelDescription:channelCustom:channelStatus:completion:)``

### Working with Channels

- ``getChannel(channelId:)``
- ``getChannel(channelId:completion:)``
- ``getChannels(filter:sort:limit:page:)``
- ``getChannels(filter:sort:limit:page:completion:)``
- ``updateChannel(id:name:custom:description:status:type:)``
- ``updateChannel(id:name:custom:description:status:type:completion:)``
- ``deleteChannel(id:soft:)``
- ``deleteChannel(id:soft:completion:)``
- ``whoIsPresent(channelId:)``
- ``whoIsPresent(channelId:completion:)``
- ``getPushChannels()``
- ``getPushChannels(completion:)``
- ``registerPushChannels(channels:)``
- ``registerPushChannels(channels:completion:)``
- ``unregisterPushChannels(channels:)``
- ``unregisterPushChannels(channels:completion:)``
- ``unregisterAllPushChannels()``
- ``unregisterAllPushChannels(completion:)``

### Working with Users

- ``getUser(userId:)``
- ``getUser(userId:completion:)``
- ``createUser(id:name:externalId:profileUrl:email:custom:status:type:)``
- ``createUser(id:name:externalId:profileUrl:email:custom:status:type:completion:)``
- ``getUsers(filter:sort:limit:page:)``
- ``getUsers(filter:sort:limit:page:completion:)``
- ``updateUser(id:name:externalId:profileUrl:email:custom:status:type:)``
- ``updateUser(id:name:externalId:profileUrl:email:custom:status:type:completion:)``
- ``deleteUser(id:soft:)``
- ``deleteUser(id:soft:completion:)``
- ``wherePresent(userId:)``
- ``wherePresent(userId:completion:)``
- ``isPresent(userId:channelId:)``
- ``isPresent(userId:channelId:completion:)``

### Working with Events
Expand All @@ -42,14 +62,19 @@
- ``EventContent``
- ``EventWrapper``
- ``EmitEventMethod``
- ``emitEvent(channelId:payload:mergePayloadWith:)``
- ``emitEvent(channelId:payload:mergePayloadWith:completion:)``
- ``listenForEvents(type:channelId:customMethod:)``
- ``listenForEvents(type:channelId:customMethod:callback:)``
- ``getEventsHistory(channelId:startTimetoken:endTimetoken:count:)``
- ``getEventsHistory(channelId:startTimetoken:endTimetoken:count:completion:)``

### Working with Messages

- ``GetUnreadMessagesCount``
- ``getUnreadMessagesCount(limit:page:filter:sort:)``
- ``getUnreadMessagesCount(limit:page:filter:sort:completion:)``
- ``markAllMessagesAsRead(limit:page:filter:sort:)``
- ``markAllMessagesAsRead(limit:page:filter:sort:completion:)``

### Retrieving Current User Mentions
Expand All @@ -59,6 +84,7 @@
- ``ChannelMentionData``
- ``ThreadMentionData``
- ``GetCurrentUserMentionsResult``
- ``getCurrentUserMentions(startTimetoken:endTimetoken:count:)``
- ``getCurrentUserMentions(startTimetoken:endTimetoken:count:completion:)``

### Destroy
Expand Down
Loading