-
Notifications
You must be signed in to change notification settings - Fork 18
[TwilioChatClient] Swift interface looks sketchy at best #20
Comments
@otymartin Thanks! However does not seem like this has changed much (looking at
|
@blender Im failing to understand your problem with that delegate declaration? |
Since the delegate is It is good practice (and much safer) to declare delegates as weak and optional. weak open var delegate: TCHChannelDelegate? I am going around this by defining in an extension extension TCHChannel: ChatChannelWithDelegate {
public weak var optionalDelegate: TCHChannelDelegate? {
guard let delegate = self.delegate else { return nil }
return delegate
}
} Poking around this gives me very little confidence is the status of the SDK and the abstractions that one can build around it. |
I am guessing it's just a matter of adding proper nullability annotations to the objc sdk. If anyone from Twilio reads this please let me know if this is the right forum or if I should be discussing this elsewhere. Thanks. |
Hi @blender - I'm on the team taking care of the iOS Chat SDK's. This is indeed related to not having nullability hints in the Obj-C interfaces and addressing this is already in process for 2.x which is coming soon. We'll update this issue when 2.0 is released. Let us know here or through our support portal (https://support.twilio.com/) if we can assist further. Thanks! |
@rbeiter Thank you very much. Looking forward to the changes. |
@rbeiter TCHMessage Since See proper ISO date parsing here: https://github.com/cheeyi/ProjectSora/blob/master/Pods/AFDateHelper/AFDateHelper/AFDateExtension.swift |
Hi,
we are currently considering Twilio for a large chat application but the TwilioChatClient Swift interface looks sketchy at best.
Consider these lines from TCHChannel:
Am I looking at production code? Is there a newer version of the SDK I should be looking at?
I am Currently on
0.16.1
Is this the right forum where to ask questions?
The text was updated successfully, but these errors were encountered: