getstream / stream-chat-swift Goto Github PK
View Code? Open in Web Editor NEW㪠iOS Chat SDK in Swift - Build your own app chat experience for iOS using the official Stream Chat API
Home Page: https://getstream.io/chat/sdk/ios/
License: Other
π¬ iOS Chat SDK in Swift - Build your own app chat experience for iOS using the official Stream Chat API
Home Page: https://getstream.io/chat/sdk/ios/
License: Other
I can see mutes
value comes from api in channel's config but it's not respected on the client:
"config": {
"created_at": "2019-08-22T08:24:56.766147237Z",
"updated_at": "2019-08-22T08:24:56.766147316Z",
"name": "commerce",
"typing_events": true,
"read_events": true,
"connect_events": true,
"search": true,
"reactions": true,
"replies": true,
"mutes": true,
"message_retention": "infinite",
"max_message_length": 5000,
"automod": "disabled",
"automod_behavior": "flag",
}
I couldn't find a way to disable flag
feature using channel's config or presenter's variable.
Disabling muting is particularly important for us because we use GetStream as a chat with our customer service. We don't want user to have ability to mute Customer Service Agent.
Iβve checked how we can create a fastlane lane for our release flow, Iβm dumping my findings here:
each step corresponds to the steps from releasing.md
:
increment_version_number(version_number: <input>)
https://docs.fastlane.tools/actions/increment_version_number/version_bump_podspec(path: <podspec>, version_number: <input>)
https://docs.fastlane.tools/actions/version_bump_podspec/git_add
, add_git_tag(tag: <input>
), git_commit, push_to_git_remote(tags: true)
https://docs.fastlane.tools/actions/jazzy https://docs.fastlane.tools/actions/jazzy/
git_add
, git_commit
, push_to_git_remote
latest_release_notes.md
file, which weβll change for each release, and make fastlane parse this fileβs contents, append it to CHANGELOG.md and also use the contents for github release: set_github_release
https://docs.fastlane.tools/actions/set_github_release/pod_push
https://docs.fastlane.tools/actions/pod_push/unreadCount to reflect current state
It still registers deletedMessage as unread
GetStream Chat version:1.5.5
iOS version:All
Swift version:All
Xcode version:All
Device:All
In our app ChatViewController is not always on very top of the screen. Because of that composer view gets too high.
I expect ComposerView
to be always on the bottom of ChatViewController, no matter what's the position of view controller (when keyboard is closed)
ComposerView moves around :D
I created commit with animation to show the problem:
https://github.com/mpodeszwa/stream-chat-swift/commit/ff7f4bef7957bcdb571032423122887d32e2c371
And there is a gif π
I'm creating ChannelPresenter using code:
let channel = Channel(type: type, id: id, name: name)
let channelPresenter = ChannelPresenter(channel: channel)
When first query succeeds framework is receiving response:
{
"channel": {
......
"config": {
"created_at": "2019-08-22T08:24:56.766147237Z",
"updated_at": "2019-08-22T08:24:56.766147316Z",
"name": "commerce",
"typing_events": true,
"read_events": true,
"connect_events": true,
"search": true,
"reactions": true,
"replies": true,
"mutes": true,
"message_retention": "infinite",
"max_message_length": 5000,
"automod": "disabled",
"automod_behavior": "flag",
"commands": [{
"name": "flag",
"description": "Flag a user",
"args": "[@username]",
"set": "moderation_set"
}, {
"name": "ban",
"description": "Ban a user",
"args": "[@username] [text]",
"set": "moderation_set"
}, {
"name": "unban",
"description": "Unban a user",
"args": "[@username]",
"set": "moderation_set"
}, {
"name": "mute",
"description": "Mute a user",
"args": "[@username]",
"set": "moderation_set"
}, {
"name": "unmute",
"description": "Unmute a user",
"args": "[@username]",
"set": "moderation_set"
}]
}
},
.......
I expect channel's config to change according to data received from backend.
Alternatively I need option to change config from the code (currently Config
doesn't have public initializer and Channel
's initializer doesn't accept config as a parameter).
Config always stays with default values. I especially need readEventsEnabled
to show number of unread messages on the badge (and mark messages as read)
GetStream Chat version: 1.2.8
iOS version: 12.4
Swift version: 5.0
Xcode version: 10.3
Device: Any device
A preview/webview to open for viewing video
Only reactionsView shows
**GetStream Chat version:1.5.3
**iOS version:All
**Swift version:5.1
**Xcode version:11.3
**Device:All
Delete channel with func deleteChannel() -> Observable<Void>
(Channel+Requests.swift:79).
Channel is deleted and the ViewChanges.itemRemoved
is send.
Channel is deleted but no ViewChanges.itemRemoved
is send.
GetStream Chat version: 1.3.3
iOS version: 12.4.1
Swift version: 4.2
Xcode version: 10.3
Device: iPhone X
I'm closing one ChatViewController (this bug doesn't happen on first entrance to ChatViewController). Later I'm creating new instance and I do following configurations:
Client.shared.setUser
ChannelPresenter
Client
observations (onEvent)If I do everything before websocket receives event message
ChatViewController is stuck and messages will never be downloaded
I've created commit to reproduce this issue:
Note: I added delay to websocket response. I need it to reproduce issue on example app but it happens on my app without this delay.
I did some investigation and framework's state looks like this:
Websocket.isConnected == false
(lastConnectionId is nil)Websocket.Connection == .connected
As a side note I've fixed my app by adding observation for event .newMessages
only once before setting user but I'm worried this race condition may show up in different situation.
Hi,
Soon we will be moving away from Pods and Carthage to SPM. Could you provide Package.swift
file to support importing GetStream using Swift Package Manager?
I called:
self.channelsPresenter.hide(channelPresenter, clearHistory: true).drive().disposed(by: self.disposeBag)
like in the example code.
I expected it to hide the channel and clear the message history
It hid the channel, but when a new message was sent on the channel, the entire message history came back for this user... it wasn't cleared.
GetStream Chat version:
1.5.4
iOS version:
13.3
Swift version:
5
Xcode version:
11.3
Device:
iPhone 8 plus
I was expecting a push notification
Didn't get any push
GetStream Chat version: 1.5.4
iOS version: 13.3
Swift version: 5
Xcode version: 11.3.1
Device: iPhone x
I was using different keys but didn't get any push so I tried using the different keys.
But no luck.
On stream dashboard under push logs it says
publishing the message failed with error: InvalidProviderToken
On log details I found the push token and I was able to send push using that token using a push test utility I found on web.
Your application has presented a UIDocumentMenuViewController (<UIDocumentMenuViewController: 0x154bc92b0>). In its current trait environment, the modalPresentationStyle of a UIDocumentMenuViewController with this style is UIModalPresentationPopover. You must provide location information for this popover through the view controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the view controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.
No crash :)
It crashes on iPhone 11 Pro Max (iOS 13.3), doesn't crash on iPhone 5s (iOS 12.4). I didn't check more devices.
GetStream Chat commit: ad9e3c8
iOS version: 13.3
Swift version: 5.1
Xcode version: 11.3.1
Device: iPhone 11 Pro Max
I am using an example app , when I take photo from camera , it crashes because of network connectivity.
It should stop uploading image and should throw error instead of crashing.
It would be great on such occasions if it would show restart button and resume upload. But nevertheless even if it doesn't crash that will be great.
Thread 1: Fatal error: Binding error: requestFailed(Optional(Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x282a74ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2806d4d20 [0x201a835e0]>{length = 16, capacity = 16, bytes = 0x100201bb3447a0070000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://chat-proxy-us-east.stream-io-api.com/channels/messagin
GetStream Chat version: Stream Chat v.1.5.4
iOS version: 13
Swift version: 5
Xcode version: 11.3
Device: iPhone7
Logs from Xcode Console
π΄ Endpoint: sendEvent(StreamChatCore.EventType.typingStart, StreamChatCore.Channel)
π΄ β± Sending request...
π΄ β‘οΈ POST https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/event?api_key=&user_id=&client_id=
π΄ π¦ Request Body {
"event" : {
"type" : "typing.start"
}
}
π΄ β« [8] 262144/1100317, 24.0%
π΄ β± Response received: 0.274 +0.274
π΄ π
ββοΈ A request was cancelled. NSError -999
2020-01-30 12:07:39.964136+0530 Werq Chat[342:16137] Task <25D723B0-D5A0-4CF9-B173-20B599048477>.<9> finished with error [-999] Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/event?api_key=&user_id=&client_id=, NSLocalizedDescription=cancelled, NSErrorFailingURLKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/event?api_key=&user_id=&client_id=}
2020-01-30 12:07:39.969929+0530 Werq Chat[342:16478] Task <25D723B0-D5A0-4CF9-B173-20B599048477>.<9> HTTP load failed, 0/0 bytes (error code: -999 [1:89])
π΄ β« [8] 294912/1100317, 27.0%
π΄ β« [8] 327680/1100317, 30.0%
π΄ β« [8] 360448/1100317, 33.0%
π΄ β« [8] 393216/1100317, 36.0%
π΄ β« [8] 425984/1100317, 39.0%
π΄ β« [8] 458752/1100317, 42.0%
π΄ β« [8] 491520/1100317, 45.0%
π΄ β« [8] 524288/1100317, 48.0%
π΄ β« [8] 557056/1100317, 51.0%
π΄ β« [8] 589824/1100317, 54.0%
π΄ β« [8] 622592/1100317, 57.0%
π΄ β« [8] 655360/1100317, 60.0%
π΄ β« [8] 688128/1100317, 63.0%
π΄ β« [8] 720896/1100317, 66.0%
π΄ β« [8] 753664/1100317, 68.0%
π΄ β« [8] 786432/1100317, 71.0%
π΄ β« [8] 819200/1100317, 74.0%
π΄ β« [8] 851968/1100317, 77.0%
π΄ β± Response received: 6.676 +6.402
π΄ π€·ββοΈ The network connection was lost. NSError -1005
2020-01-30 12:07:46.365473+0530 Werq Chat[342:16478] Task <EA09EE84-E4C8-48D3-B646-145436E86B33>.<8> HTTP load failed, 852714/0 bytes (error code: -1005 [4:-4])
2020-01-30 12:07:46.366247+0530 Werq Chat[342:16121] Task <EA09EE84-E4C8-48D3-B646-145436E86B33>.<8> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x282a74ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2806d4d20 [0x201a835e0]>{length = 16, capacity = 16, bytes = 0x100201bb3447a0070000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/image?api_key=&user_id=&client_id=, NSErrorFailingURLKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/image?api_key=&user_id=&client_id=, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=The network connection was lost.}
π΄ β Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x282a74ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2806d4d20 [0x201a835e0]>{length = 16, capacity = 16, bytes = 0x100201bb3447a0070000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/image?api_key=&user_id=&client_id=, NSErrorFailingURLKey=https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPtTUswzmZdAvRk9eJHwRPonhXN0l8n_Esj7kFBQ/image?api_key=&user_id=&client_id=, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=The network connection was lost.} in parse(data:response:error:completion:)[255]
(lldb)
I just called your add device method with device token and it got every possible parameters
along with success .
Push Notification(s)
No Push Notifications
GetStream Chat version: 1.5.7
**iOS version:**13.3
**Swift version:**5
**Xcode version:**11.3.1
**Device:**iPhone 7 Plus
I debug and found that it is giving me successful device addition in terms of push notifications but still no push notifications no idea .
Send message with image/video attachment
Wait for the upload to end
Send the message and then upload (like whatsapp)
GetStream Chat version:1.5.5
iOS version:All
Swift version:All
Xcode version:All
Device:All
I was trying to get the members of a channel. I found the members
set on the Channel
type but it seems to be always empty.
I tried to trace back the path how the members
property of a Channel
is set but couldn't find a way which is working. Unfortunately, the response from the API dosen't contains members on the level of a channel, if we fetch channels with a ChannelPresenter
.
But, what I also discoverd was the members
set on the ChannelPresenter
type which is set by parsing a ChannelResponse
in private func parseResponse(_ query: ChannelResponse) -> ViewChanges
. Unfortunately the members
property is not public so it can't be used outside of StreamChatCore.
My questions are:
Why we need this?
Hi, I need to support custom attachments in my app. I found Attachment
class here but it's not really sufficient for my case. I need more custom fields inside.
Is there a way to register my custom Attachment
struct for a given attachment's type
? Or is there any override point where I can add my custom type?
General discussion about the roadmap for the iOS library, let us know your thoughts.
No crash :D
Crash π€·ββ
2019-09-06 17:31:45.684197+0200 AHOYRC[16341:6943594] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete row 28 from section 0 which only contains 28 rows before the update'
*** First throw call stack:
(
0 CoreFoundation 0x000000011474a8db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000113cedac5 objc_exception_throw + 48
2 CoreFoundation 0x000000011474a662 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010d8ab76b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0x000000011cf18282 -[UITableView _endCellAnimationsWithContext:] + 4898
5 UIKitCore 0x000000011cf34941 -[UITableView _performBatchUpdates:withContext:completion:] + 253
6 UIKitCore 0x000000011cf34a2b -[UITableView performBatchUpdates:completion:] + 52
7 StreamChat 0x0000000112192654 $s10StreamChat0B14ViewControllerC011updateTableC033_B6716BA6282A64D555BE30E64C17210ALL4withy0aB4Core0C7ChangesO_tFyyXEfU_ + 388
8 StreamChat 0x00000001121949d0 $s10StreamChat0B14ViewControllerC011updateTableC033_B6716BA6282A64D555BE30E64C17210ALL4withy0aB4Core0C7ChangesO_tFyyXEfU_TA + 48
9 StreamChat 0x0000000112194901 $sIg_Ieg_TRTA + 17
10 StreamChat 0x0000000112194e39 $sIg_Ieg_TRTA.42 + 9
11 StreamChat 0x0000000112189a7e $sIeg_IyB_TR + 14
12 UIKitCore 0x000000011d1eaec1 +[UIView(Animation) performWithoutAnimation:] + 90
13 StreamChat 0x000000011218f5de $s10StreamChat0B14ViewControllerC011updateTableC033_B6716BA6282A64D555BE30E64C17210ALL4withy0aB4Core0C7ChangesO_tF + 4830
14 StreamChat 0x000000011218e2c2 $s10StreamChat0B14ViewControllerC11viewDidLoadyyFy0aB4Core0C7ChangesOcfU0_TA + 66
15 StreamChat 0x0000000112182f8a $s14StreamChatCore11ViewChangesOIegg_ACIegn_TR + 42
16 StreamChat 0x000000011218e2f1 $s14StreamChatCore11ViewChangesOIegg_ACIegn_TRTA + 17
17 RxSwift 0x00000001136a9dd5 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_ + 373
18 RxSwift 0x00000001136a9fd5 $s7RxSwift14ObservableTypePAAE9subscribe6onNext0F5Error0F9Completed0F8DisposedAA10Disposable_py7ElementQzcSg_ys0H0_pcSgyycSgAOtFyAA5EventOyAKGcfU_TA + 53
19 RxSwift 0x00000001136c3267 $s7RxSwift17AnonymousObserverC6onCoreyyAA5EventOyxGF + 39
20 RxSwift 0x00000001136ab823 $s7RxSwift12ObserverBaseC2onyyAA5EventOyxGF + 227
21 RxSwift 0x00000001136aba42 $s7RxSwift12ObserverBaseCyxGAA0C4TypeA2aEP2onyyAA5EventOy7ElementQzGFTW + 18
22 RxSwift 0x000000011371f943 $sTA + 67
23 RxSwift 0x000000011369b3bc $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTR + 12
24 RxSwift 0x000000011371676d $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA + 29
25 RxSwift 0x00000001137167b9 $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA.13 + 9
26 RxSwift 0x000000011371556d $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLC2onyyAA5EventOyxGFTm + 109
27 RxSwift 0x0000000113715007 $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 23
28 RxSwift 0x00000001136c1ee3 $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 99
29 RxSwift 0x00000001136828d3 $s7RxSwift10FilterSink33_172A575932639FDD42969ED91F7BE949LLC2onyyAA5EventOy7ElementQzGF + 451
30 RxSwift 0x0000000113682a40 $s7RxSwift10FilterSink33_172A575932639FDD42969ED91F7BE949LLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 16
31 RxSwift 0x000000011371f943 $sTA + 67
32 RxSwift 0x000000011369b3bc $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTR + 12
33 RxSwift 0x000000011371676d $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA + 29
34 RxSwift 0x00000001137167b9 $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA.13 + 9
35 RxSwift 0x000000011371556d $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLC2onyyAA5EventOyxGFTm + 109
36 RxSwift 0x0000000113715007 $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 23
37 RxSwift 0x00000001136c1ee3 $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 99
38 RxSwift 0x00000001136d0e76 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLC2onyyAA5EventOy7ElementQy_GF + 422
39 RxSwift 0x00000001136d0f70 $s7RxSwift13MergeSinkIter33_DDEA0423368B3B462AE46699A4D080E1LLCyxq_q0_GAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 16
40 RxSwift 0x000000011371f943 $sTA + 67
41 RxSwift 0x000000011369b3bc $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTR + 12
42 RxSwift 0x000000011371676d $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA + 29
43 RxSwift 0x00000001137167b9 $s7RxSwift5EventOyxGIegn_ADytIegnr_7ElementQyd__RszAA12ObserverTypeRd__r__lTRTA.13 + 9
44 RxSwift 0x000000011371556d $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLC2onyyAA5EventOyxGFTm + 109
45 RxSwift 0x0000000113715007 $s7RxSwift36ShareReplay1WhileConnectedConnection33_E9FE621655D67A613BF2FC2D9B3041FCLLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 23
46 RxSwift 0x00000001136c1ee3 $s7RxSwift4SinkC9forwardOnyyAA5EventOy7ElementQzGF + 99
47 RxSwift 0x00000001136acb77 $s7RxSwift9CatchSink33_7E15DB08AB19A7B882D5C92A393C6F6DLLC2onyyAA5EventOy7ElementQzGF + 375
48 RxSwift 0x00000001136aceb0 $s7RxSwift9CatchSink33_7E15DB08AB19A7B882D5C92A393C6F6DLLCyxGAA12ObserverTypeA2aFP2onyyAA5EventOy7ElementQzGFTW + 16
49 RxSwift 0x00000001137254a5 $s7RxSwift32ObserveOnSerialDispatchQueueSink33_277A93ABA8477198C125F3F26B2D4B62LLC9scheduler8observer6cancelADyxGAA0efG9SchedulerC_xAA10Cancelable_ptcfcAA10Disposable_pAH4sink_AA5EventOy7ElementQzG5eventt_tcfU_ + 437
50 RxSwift 0x0000000113725cec $s7RxSwift32ObserveOnSerialDispatchQueueSink33_277A93ABA8477198C125F3F26B2D4B62LLC9scheduler8observer6cancelADyxGAA0efG9SchedulerC_xAA10Cancelable_ptcfcAA10Disposable_pAH4sink_AA5EventOy7ElementQzG5eventt_tcfU_TA + 12
51 RxSwift 0x0000000113725c8a $s7RxSwift32ObserveOnSerialDispatchQueueSink33_277A93ABA8477198C125F3F26B2D4B62LLCyxGAA5EventOy7ElementQzGAA10Disposable_pIeggnr_AE_AJtAaK_pIegnr_AA12ObserverTypeRzlTRTA + 154
52 RxSwift 0x000000011369e821 $s7RxSwift13MainSchedulerC16scheduleInternal_6actionAA10Disposable_px_AaF_pxctlFyycfU_ + 113
53 RxSwift 0x000000011369ea51 $s7RxSwift13MainSchedulerC16scheduleInternal_6actionAA10Disposable_px_AaF_pxctlFyycfU_TA + 33
54 RxSwift 0x00000001136929d0 $sIeg_IeyB_TR + 32
55 libdispatch.dylib 0x000000011589fd7f _dispatch_call_block_and_release + 12
56 libdispatch.dylib 0x00000001158a0db5 _dispatch_client_callout + 8
57 libdispatch.dylib 0x00000001158ae080 _dispatch_main_queue_callback_4CF + 1540
58 CoreFoundation 0x00000001146b1a79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
59 CoreFoundation 0x00000001146ac126 __CFRunLoopRun + 2310
60 CoreFoundation 0x00000001146ab4d2 CFRunLoopRunSpecific + 626
61 GraphicsServices 0x00000001171902fe GSEventRunModal + 65
62 UIKitCore 0x000000011cd19fc2 UIApplicationMain + 140
I fixed it by adding this code but I think it should be in the framework :)
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
refreshTableView(scrollToBottom: true, animated: false)
}
I uploaded the small video from camera, on 1.5.4 it shows reaction view and on 1.5.5 it crashes
View video on taping link.
Crashes when I tap video.
Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
GetStream Chat version: 1.5.5
iOS version: iOS 12
Swift version: 5
Xcode version: 11.3.1
Device:
Logs from Xcode console
stream-chat-swift/Sources/UI/Web View/WebViewController.swift: 155: 19: Fatal error: Use of unimplemented initializer 'init(nibName:bundle:)' for class 'StreamChat.WebViewNavigationController'
2020-01-30 17:46:03.070103+0530 ChatExample[10610:205186]
stream-chat-swift/Sources/UI/Web View/WebViewController.swift: 155: 19: Fatal error: Use of unimplemented initializer 'init(nibName:bundle:)' for class 'StreamChat.WebViewNavigationController'
Sent messages to an iOS 13 device
Receive a push notification and for channelsViewController to update the channel cells with the latest messages
No push notification in or out of the app, and channelsViewController stays stale with old messages until you restart the app
GetStream Chat version: stream-chat v1.1.4, StreamChatCore v1.3.20
iOS version: 13.1.2
Swift version: 5
Xcode version: 11.0
Device: iPhone X
Observed push notifications behaving correctly on iOS 11/12 with same environment. Apple recently added a new attribute to the headers for APNS Headers, apns-push-type, which is required in iOS 13. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns?language=objc
Does sdk has logout to support multiple users?
Framework crashed with error:
Fatal Exception: NSInternalInconsistencyException
Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (28), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).
Stacktrace:
chat update table crash.txt
We shipped app with GetStream at commit f2ab4e8
Occasionally our users get an error "A Web Socket connection id is empty. Authorization missed". Usually it happens right after application is becoming active (after being in background), sometimes up to 20 seconds after becoming active. Do you know what may be happening?
GetStream Chat commit: ad9e3c8
iOS version: 13.3
Swift version: 5.1
Xcode version: 11.3.1
Device: iPhone XS
(device and ios version from sample report)
In my config reactions are disabled and I receive message with link inside.
I expect links inside message to work.
When I tap on link nothing happens.
GetStream Chat version: 1.5.1
Most probably it's because of this code:
cell.messageStackView.rx.anyGesture(presenter.channel.config.reactionsEnabled
? [TapControlEvent.default, LongPressControlEvent.default]
: [LongPressControlEvent.default])
.subscribe(onNext: { [weak self, weak cell] gesture in
if let self = self, let cell = cell {
if let tapGesture = gesture as? UITapGestureRecognizer {
self.handelMessageCellTap(from: cell, in: message, tapGesture: tapGesture)
} else {
self.showMenu(from: cell, for: message, locationInView: gesture.location(in: cell))
}
}
})
.disposed(by: cell.disposeBag)
when reactions are disabled, tap gesture recognizer is not handled.
ComposerView relocates itself when keyboard appears
ComposerView got stuck behind keyboard
**GetStream Chat version:1.5.4
**iOS version:11, 12, 13
**Swift version:5.1
**Xcode version:11.3
**Device:All
I present ChatViewController
in UITabBarController
. If user is not on the chat tab I'm observing new messages using code:
Client.shared.onEvent(.messageNew)
.subscribe(onNext: { [weak self] event in
if case let .messageNew(_, unread, _, _, _, _) = event {
self?.presenter.setBadge(unread)
}
})
I expect unread messages counter to increase with every new message and messages should be marked as read only after user enters the view. I can see code doing that:
open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
startGifsAnimations()
markReadIfPossible()
}
However there is this code in viewDidLoad
which marks messages as read even if view controller is currently not visible:
presenter.changes
.filter { [weak self] _ in self?.changesEnabled ?? false }
.do(onNext: { [weak self] _ in self?.markReadIfPossible() })
.drive(onNext: { [weak self] in self?.updateTableView(with: $0) })
.disposed(by: disposeBag)
Every message received is immediately marked as read even though user is on another tab.
GetStream Chat version: 1.2.10
Get [link](www.url.com)
to render in markdown (as link)
None
None
GetStream Chat version:1.5.6
iOS version:All
Swift version:All
Xcode version:All
Device:All
I created ChatViewController using code:
channelPresenter = ChannelPresenter(channel: channel)
channelPresenter?.reload()
Chat is being presented to the user after logging in to the application. When user enters the app chat is working properly. However, when he logs out and logs back in (to the same account or a different one) chat is not loading.
Chat is working every time.
Second ChatViewController never gets refreshed
GetStream Chat version: 1.2.5
iOS version: 12.4
Swift version: 5.0.1
Xcode version: 10.3
Device: iPhone Xs
There are some logs.
First time ChatViewController is created:
π± App state active
πΈ Available πββοΈ
π΄ [27/08/2019 11:36:58.812] π« Skip read.
π¦ [27/08/2019 11:36:59.075] β€οΈ Connecting...
π¦ [27/08/2019 11:36:59.075] β‘οΈ GET wss://chat-us-east-1.stream-io-api.com/connect?......&stream-auth-type=jwt
π¦ [27/08/2019 11:36:59.076] Request headers:
βΎοΈ Origin = wss://chat-us-east-1.stream-io-api.com
π¦ [27/08/2019 11:37:00.342] WebSocket connected. Waiting for the first health check message...
π¦ [27/08/2019 11:37:00.402] π¦ {
"created_at" : "2019-08-27T09:37:00.28453431Z",
....
}
π¦ [27/08/2019 11:37:00.405] π₯° Connected
.... more responses
Logging out:
π¦ [27/08/2019 11:37:06.995] π Disconnected deliberately
Logging back in to the same account (same channel id, different instances of ChatViewController and ChatPresenter):
π± App state active
πΈ Available πββοΈ
π΄ [27/08/2019 11:37:19.012] π« Skip read.
π¦ [27/08/2019 11:37:19.018] β€οΈ Connecting...
π¦ [27/08/2019 11:37:19.019] β‘οΈ GET wss://chat-us-east-1.stream-io-api.com/connect?....&stream-auth-type=jwt
π¦ [27/08/2019 11:37:19.019] Request headers:
βΎοΈ Origin = wss://chat-us-east-1.stream-io-api.com
π΄ [27/08/2019 11:37:19.059] π« Skip read.
There are no memory leaks, however I can see instances of following types still existing after logging out:
Client
ClientURLSessionTaskDelegate
InternetConnection
WebSocket
1.) Start app
2.) Fetch channels for type "team" via ChannelsPresenter
3.) Fetch channels for type "messaging" via ChannelsPresenter
4.) SDK starts watching on a "team" channel
The channel with type "team" is not visible all channels with type "messaging".
The channel with type "team" is duplicated and the new channel gets the type "messaging".
I did a little debugging and found out that the SDK always tries to watch a channel based on the channel_id
and the default type "messaging" (Channel.swift:88), see ChannelPresenter.swift:99
and Client+Event.swift:36
.
This causes the watch request (POST) to create a new channel for the given channel_id
with type "messaging" because there is no channel with messaging:channel_id
only a channel for the cid team:channel_id
.
**GetStream Chat version: 1.3.0 **
I'm using GetStream for chat with customer service. I need to support messages visible only to the customer service agent on web but invisible to the user on ios (like internal messages from other services). I tried writing code like this:
override func messageCell(at indexPath: IndexPath, message: Message, readUsers: [StreamChatCore.User]) -> UITableViewCell {
let attachment = message.attachments.first(where: { $0.extraData?.data is ExtraAttachmentData })
if attachment?.type == AttachmentType.custom(type: "notification"), let notification = (attachment?.extraData?.data as? ExtraAttachmentData)?.data {
if notification.isHidden {
return tableView.dequeueReusableCell(withType: ChatHiddenCell.self, for: indexPath)
} else {
let cell = tableView.dequeueReusableCell(withType: ChatNotificationCell.self, for: indexPath)
cell.setup(notification: notification)
return cell
}
}
return super.messageCell(at: indexPath, message: message, readUsers: readUsers)
}
ChatHiddenCell
is just UITableViewCell with height 0, ChatNotificationCell
is my custom cell for notifications presented to the user.
However there will be a problem with date cells showing above invisible messages.
Would it be possible to add filter
to ChannelPresenter
or ChatViewController
so GetStream can ignore some messages and never add them to var items: [StreamChatCore.ChatItem]
?
We are trying to understand how to check if a message was read by a specific user.
Our app subscribes to the view changes of a channel and uses the items which are returned by ViewChanges.itemAdded
- Then we iterate over every item (ChatItem
) and cast it with case message(Message, _ usersRead: [User])
to a message and the list of users which should already read the message. Unfortunately the list is always empty.
The last_read
in read
on the channel JSON response shows a younger date then all messages in the channel, so as I understand it right now all messages should be seen as read but we never get a list of usersRead.
Could you explain how we can check if a user has read a message?
Which will result in an empty channel on the next try because of the failed query HTTP call which returns the following error message:
{
"code": 4,
"message": "GetOrCreateChannel failed with error: \"Duplicate members passed to get or create channel, only send 1 member once\"",
"StatusCode": 400,
"duration": "0.00ms"
}
GetStream Chat version: 1.3.2
We tried to trace back the issue and found out that the code at Channel+Requests.swift:23
if let user = User.current {
members.insert(user.asMember)
}
adds the duplicate. This is confusing because it should be a set and ignore users with the same identity. So, we checked the equality operator on the member type, see Member.swift:72
.
public static func == (lhs: Member, rhs: Member) -> Bool {
return lhs.user == rhs.user
&& lhs.created == rhs.created
&& lhs.updated == rhs.updated
}
Besides the identity of the user the function also checks for dates which are different for the User.current
than the orignial user because they are initialize with the current date, see User.swift:99
created = .default
updated = .default
The initializer of the user type is used to do the intial setup with Client.shared.set(user:token:)
Just a proposal for improvement, make static let version: String
(Client+Request.swift:12) public. This would help to identify at runtime which version of stream-chat is used.
For example, we use this in crash reports and also for user support requests. Would make our life a little bit easier π€©
Framework crashed on our app with following error:
Fatal Exception: NSInternalInconsistencyException
Invalid parameter not satisfying: formatOptions == 0 || !(formatOptions & ~(NSISO8601DateFormatWithYear | NSISO8601DateFormatWithMonth | NSISO8601DateFormatWithWeekOfYear | NSISO8601DateFormatWithDay | NSISO8601DateFormatWithTime | NSISO8601DateFormatWithTimeZone | NSISO8601DateFormatWithSpaceBetweenDateAndTime | NSISO8601DateFormatWithDashSeparatorInDate | NSISO8601DateFormatWithColonSeparatorInTime | NSISO8601DateFormatWithColonSeparatorInTimeZone | NSISO8601DateFormatWithFullDate | NSISO8601DateFormatWithFullTime | NSISO8601DateFormatWithInternetDateTime))
globalinit_33_4C19912DD841259A848CA079747E3591_func7
Stacktrace:
getstream crash.txt
We shipped app with GetStream at commit f2ab4e8
Hi guys,
we started to integrate push notification into our app based on StreamChatCore
.
As far as I can see the SDK dosen't support register/unregister device token, right now. But I also saw that you already added a draft to Endpoint
for add, remove and list of device tokens. I implemented the addDevice
call to do some testing on our side which worked so far.
Could you give as a little bit more insights when do you plan to support register/unregister device tokens via the SDK?
Thx
Jan
On my application ChatViewController doesn't start from the top, it has offset.
When keyboard appears composer should move up so user can see his message while typing
Composer is under keyboard, user can't see textfield when keyboard is open
I created branch to show the problem:
https://github.com/mpodeszwa/stream-chat-swift/commits/demo/vc-offset
I uploaded a video and app crashed. I see in logs, body size exceeded the limit (20M)
It should not crash instead should throw error , if possible before even upload begins.
Crashed with
Thread 1: Fatal error: Binding error: responseError(StreamChatCore.ClientErrorResponse(code: 22, message: "body size exceeded the limit (20M)", statusCode: 400))
π΄ β« [7] 32768/78055962, 0.0%
π΄ β« [7] 65536/78055962, 0.0%
π΄ β« [7] 98304/78055962, 0.0%
π΄ β« [7] 131072/78055962, 0.0%
π΄ β« [7] 163840/78055962, 0.0%
π΄ β« [7] 229376/78055962, 0.0%
π΄ β± Response received: 1.853 +1.853
π΄ β¬
οΈ Response 413 (95 bytes): https://chat-proxy-us-east.stream-io-api.com/channels/messaging/!members-HSeqPt/file?api_key=&user_id=&client_id=
π΄ π¦ {
"code" : 22,
"message" : "body size exceeded the limit (20M)",
"StatusCode" : 400,
"duration" : "0.00ms"
}
GetStream Chat version: Stream Chat v.1.5.4
iOS version: 13
Swift version: 5
Xcode version: 11.3.1
Device: iPhone 7
GetStream Chat version:1.5.4
iOS version:All
Swift version:All
Xcode version:All
Device:All
I'm creating chat view using code:
let channel = Channel(type: .commerce, id: channelId, name: channelName)
let channelPresenter = ChannelPresenter(channel: channel, showStatuses: true)
let chatView = ChatViewController()
chatView.channelPresenter = channelPresenter
When channel is created using this initializer it'll have default config:
Channel.swift:130
config = Config()
I expect add attachment button to appear once config is loaded (in initial request of loading messages)
Composer view is lazily created once
open func createComposerAddFileContainerView(title: String) -> ComposerHelperContainerView? {
guard let presenter = channelPresenter, presenter.channel.config.uploadsEnabled, !composerAddFileTypes.isEmpty else {
return nil
}
...
}
so when config is loaded composer view doesn't change
GetStream Chat version: 1.3.19
I present Chat inside UITabBarController
Input is right above keyboard
Input is offset from the keyboard (probably by tabbar's height)
Device: Iphone 11
I created branch to show the problem:
https://github.com/mpodeszwa/stream-chat-swift/tree/bugfix/tab-input-offset
I updated StreamChat to version 1.5.6 using Carthage. When I tried uploading build to the appstore I got following error:
2020-02-14 12:23:10.549 altool[88113:33733047] ERROR ITMS-90205: "Invalid Bundle. The bundle at '.app/Frameworks/StreamChat.framework' contains disallowed nested bundles."
2020-02-14 12:23:10.549 altool[88113:33733047] ERROR ITMS-90206: "Invalid Bundle. The bundle at '.app/Frameworks/StreamChat.framework' contains disallowed file 'Frameworks'.
After investigating closer I found out StreamChat.framework
contains StreamChatCore.framework
inside:
~> tree StreamChat.framework
StreamChat.framework
βββ Assets.car
βββ Frameworks
βΒ Β βββ StreamChatCore.framework
βΒ Β βββ Info.plist
βΒ Β βββ StreamChatCore
βββ Headers
βΒ Β βββ StreamChat-Swift.h
βΒ Β βββ StreamChat.h
βββ Info.plist
βββ Modules
βΒ Β βββ StreamChat.swiftmodule
βΒ Β βΒ Β βββ arm64-apple-ios.swiftdoc
βΒ Β βΒ Β βββ arm64-apple-ios.swiftmodule
βΒ Β βΒ Β βββ arm64.swiftdoc
βΒ Β βΒ Β βββ arm64.swiftmodule
βΒ Β βΒ Β βββ x86_64-apple-ios-simulator.swiftdoc
βΒ Β βΒ Β βββ x86_64-apple-ios-simulator.swiftmodule
βΒ Β βΒ Β βββ x86_64.swiftdoc
βΒ Β βΒ Β βββ x86_64.swiftmodule
βΒ Β βββ module.modulemap
βββ StreamChat
5 directories, 16 files
StreamChat.framework
shouldn't contain StreamChatCore.framework
. It should be included by the apps integrating the library.
StreamChat.framework
contains StreamChatCore.framework
and altool
rejects the build before submitting
GetStream Chat version: 1.5.6
Xcode version: 11.3.1
Carthage version: 0.34.0
It was fine at commit ad9e3c8 .
To reproduce just build StreamChat
using carthage
Composer View should appear right on top of the Keyboard, no gaps should be displayed
Strange gap appeared in between keyboard and Composer View. See resources below.
https://pasteboard.co/ISJs66E.png
https://drive.google.com/file/d/1DAKaQ50DBbgwZCI_d4b08d2ztaD98p78/view?usp=sharing
GetStream Chat version: 1.5.5
iOS version: 13.3
Swift version: 5.2.1
Xcode version: 11.2.1 (11B500)
Device: All devices
If you guys do not have the time for solving this soon, I would like to hear any insight you can provide on how could it be solved, and then I can try to do so, if it works I'd love to open the PR.
Any help would be much appreciated!
PS: I have also read other issues such as #28 and #36 and it seems like it is still happening.
I can also say: my ChatViewController is embedded on a TabBarController if that helps.
The ChannelsPresenter
dosen't use channelType
for filtering by default, I had to set a filter for the channel type by hand.
Is this behavior by intention?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.