0

I have intregrated mesibo chat sdk in flutter framework all is working good but can't able to have contact letter image after enabling the useLetterTitleImage = true . Can any body can tell what function add for contact image android it is working but getting issue on ios i am sharig file and screen shot as well enter image description here

Code :

             import UIKit
import mesibo

import MesiboUI

class SecondViewController: UIViewController,MesiboDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()
     
        let ui = Mesibo.getInstance().getUiOptions()

        UINavigationBar.appearance().tintColor = UIColor.white
        ui?.contactPlaceHolder = nil
        
        ui?.mStatusBarColor = 0xf000000
        ui?.mToolbarColor =  0xf000000
        ui?.enableBackButton = false
        ui?.useLetterTitleImage = true
        
        ui?.emptyUserListMessage = "NO MESSAGES"
       
        Mesibo.getInstance()?.setUiOptions(ui!)
        navigationController?.navigationItem.setHidesBackButton(true, animated:false)
        navigationController?.pushViewController(MesiboUI.getViewController(navigationController?.delegate), animated: false)

        Mesibo.getInstance()?.addListener(self)
                 
     
     



       
    }
    
 
    override func didMove(toParent parent: UIViewController?) {
        super.didMove(toParent: parent)

        if parent == nil {
            debugPrint("Back Button pressed.")
        }
    }

    private func add(asChildViewController viewController: UIViewController) {
        // Add Child View Controller
        addChild(viewController)

        // Add Child View as Subview
        view.addSubview(viewController.view)

        // Configure Child View
        viewController.view.frame = view.bounds
        viewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]

        // Notify Child View Controller
        viewController.didMove(toParent: self)
    }
   
       func mesibo_(onConnectionStatus status: Int32) {
           print("Connection status: %d", status);
   

       }

       func mesibo_(onMessageStatus params: MesiboParams!) {
           print(params ?? "")
      }

       func mesibo_(onMessage params: MesiboParams!, data: Data!) {
           print("data")
          
       }
    
   
    func mesibo_(onMessageFilter params: MesiboParams!, direction: Int32, data: Data!) -> Bool {
           return true
       }
       func mesibo_(onUserProfileUpdated profile: MesiboUserProfile!, action: Int32, refresh: Bool) {
          
           
       }
       
       func mesibo_(onShowProfile parent: Any!, profile: MesiboUserProfile!) {
           
           
       }
    
       func mesibo_(onUpdateUserProfiles profile: MesiboUserProfile!) -> Bool {
            
        return true
           
       }
       
JideGuru
  • 7,102
  • 6
  • 26
  • 48
Aditya Jaitly
  • 292
  • 2
  • 10

1 Answers1

0

You should set a profile picture for the mesibo UserProfile. If not, it will use a letter titler image

This is the code https://github.com/mesibo/ui-modules-ios/blob/master/Messaging/Messaging/UserListViewController.m#L1149

As you can see, it sets a letter titler image if it can't find the thumbnail.

mesibo
  • 3,970
  • 6
  • 25
  • 43
  • it is not setting thumbnail it us setting letter image with * as you see LetterTitleImage.m image there is a condition where if NSString *firstChar = @"*"; if(nil != text && text.length != 0) { firstChar = [[text substringToIndex:1] capitalizedString]; } my text equal to nil and i am not getting this why did you have idea about it – Aditya Jaitly Jul 20 '20 at 05:29