cometchat-go / xamarin-forms-chat-sdk-demo

CometChat Demo App for Xamarin Forms
6 stars 4 forks source link

OnWindowClose event does not exist / implemented for iOS. #6

Closed joseBarreto closed 5 years ago

joseBarreto commented 5 years ago

For android implementation ["cometchat.LaunchCometChat"] accepts as parameter the onWindowClose, which is calling when pressing the android back button.

For the implementation of iOS ["cometchat.LaunchCometChat"] there is no option to pass this event, and when we click on the "X" at the top of the page, that does the action of coming back on iOS we do not have a return method that cometChar was closed.

Is this an error with the binding or is there any way to capture the closed cometChat for iOS?

joseBarreto commented 5 years ago

this "X"

image

jigar-shethia01 commented 5 years ago

Hello,

When you click the "X" button you will get an OnLauchSuccess of LaunchCometChat method. You will get login = "Window Closed" event.

Thanks.

joseBarreto commented 5 years ago

[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] [Export("launchCometChat:observer:userInfo:groupInfo:onMessageReceive:success:failure:onLogout:")] public virtual void LaunchCometChat(bool isFullScreen, UIViewController currentView, [BlockProxy(typeof(NIDActionArity1V0))] Action userInfo, [BlockProxy(typeof(NIDActionArity1V0))] Action groupInfo, [BlockProxy(typeof(NIDActionArity1V0))] Action onMessageReceive, [BlockProxy(typeof(NIDActionArity1V0))] Action success, [BlockProxy(typeof(NIDActionArity1V1))] Action failure, [BlockProxy(typeof(NIDActionArity1V0))] Action onLogout);

This success? Is not it called for the return of success when CometChat is opened?

joseBarreto commented 5 years ago

Is there any reason these calls are different between iOS and Android?

Hello,

When you click the "X" button you will get an OnLauchSuccess of LaunchCometChat method. You will get login = "Window Closed" event.

Thanks.

jigar-shethia01 commented 5 years ago

Hello,

The implementation is different for both the platforms as per the project structure. However, you can use the login = "Window Closed" event which you get when you click the "X" button.

Thanks.