DrdshChatSDKTest 1.2.0

DrdshChatSDKTest 1.2.0

WhollySoftware 维护。



 
依赖
SwiftyJSON~> 4.0
MBProgressHUD>= 0
IQKeyboardManagerSwift= 6.2.1
Socket.IO-Client-Swift>= 0
 

  • WhollySoftware

DrdshChatSDKTest

CI Status Version License Platform

截图

https://www.drdsh.live/sdk/close-chat.png

功能

包括以下功能:

  • 让客户生活更便捷
  • 无缝集成
  • 满足您的客户
  • 取悦您的客户
  • 增强您的服务
  • 节省时间和精力
  • 通过 DRDSH 试用版,零费用开始。

要求

包括以下要求:

  • Swift 版本:4.0
  • Xcode:11 或更高版本

安装

CocoaPods

CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它

$ gem install cocoapods

要使用 CocoaPods 将 DrdshChatSDKTest 集成到您的 Xcode 项目中,请在您的 Podfile 中指定它

pod 'DrdshChatSDKTest'
end

然后,运行以下命令

$ pod install

用法

步骤 1

  • 要访问 DrdshChatSDKTest,您需要将 Pod 导入到您的项目中
    import DrdshChatSDKTest
    
    class ViewController: UIViewController {

    }

步骤 2

  • 要打开 SDK 聊天支持,您需要有 appSid 并将其传递给 DrdshChatSDKConfiguration() 对象,如下所示
    let sdkCongig = DrdshChatSDKConfiguration()
    sdkCongig.appSid = "5def86cf64be6d13f55f2034.5d96941bb5507599887b9c71829d5cffcdf55014"
    

步骤 3

  • 要打开 SDK,您需要调用带有 DrdshChatSDKConfiguration() 对象的以下函数
     DrdshChatSDKTest.presentChat(config: sdkCongig)

步骤 4

  • 以下是用 dummy appSid 完全打开 SDK 的代码
    @IBAction func btnStartChatAction(_ sender:UIButton){
        let sdkCongig = DrdshChatSDKConfiguration()
        sdkCongig.appSid = "5def86cf64be6d13f55f2034.5d96941bb5507599887b9c71829d5cffcdf55014"
        DrdshChatSDKTest.presentChat(config: sdkCongig)
    }

自定义

  • 此 Pod 可以很容易地使用 DrdshChatSDKConfiguration() 对象进行完全自定义,如下所示
    let sdkCongig = DrdshChatSDKConfiguration()
    
    
    //if you need in Arabic langauge
    sdkCongig.local = "ar"

    //set the Background color
    sdkCongig.bgColor = "#ffffff"
    
    //set the Button Background color
    sdkCongig.buttonColor = "#6f2b91"
    
    //set the Navigation Bar color
    sdkCongig.topBarBgColor = "#6f2b91"
    
    //set the My Chat Bubble color
    sdkCongig.myChatBubbleColor = "#EEEEEE"
    
    //set the My Chat text color
    sdkCongig.myChatTextColor = "#47336b"
    
    //set the Opposite Chat Bubble color
    sdkCongig.oppositeChatBubbleColor = "#6f2b91"
    
    //set the Opposite Chat Text color
    sdkCongig.oppositeChatTextColor = "#FFFFFF"

    

完成

就这样,您已成功集成 DrdshChatSDKTest

作者

HTF, [email protected]

问题

如果您发现任何问题,请 创建一个问题

许可证

Apache 许可协议,版本 2.0。请参阅 LICENSE 文件。