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

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

Setup language in xamarin.forms ios project #30

Open prakash-malodiya opened 4 years ago

prakash-malodiya commented 4 years ago

I am using xamarin.forms 4.3.0.947036 in one of my project created using visual studio 2017 in windows os. I had installed cometchat package for both android and ios project as per your given steps for setup (https://developer.cometchat.com/docs/xamarin-forms-setup) and it works well in both android and iOS application. But we are unable to set cometchat language in ios application but able to set it in android application. We already have added some languages in cometchat admin panel.

Please find below code for setup language in iOS application. We are calling this method when cometchat initialization is successful. I had installed cometchat package v7.44.0 (xamarin.ios.cometchat and xamarin.ios.cometchat.ui) in ios project.

this.cometchat.setLanguage( "es", (dict) => { ////callback.SuccessCallback(dict.ToString()); }, (err) => { ////callback.FailureCallback(err.ToString()); });

Above code gives error 'Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[CometChat setLanguage:success:failure:]: unrecognized selector sent to instance 0x7ff64b424c00'