LitmusCXLibrary 0.3.3

LitmusCXLibrary 0.3.3

TestsTested
LangLanguage SwiftSwift
License Apache 2
ReleasedLast Release Feb 2022
SPMSupports SPM

Maintained by Fenil Jain, Boban Baby, Murli Singh.



 
Depends on:
Alamofire~> 5.4.0
SwiftyJSON= 5.0
 

  • By
  • anubhavgiri

LitmusCXLibrary

comment: # ( CI Status )
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

LitmusCXLibrary is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LitmusCXLibrary"

Implementation

To call Litmus Library, do below steps -

Swift

1. Initiate a conversation in Full Screen

import LitmusCXLibrary

1.a Open Conversation from App id

LitmusCXViewController.fnOpenLitmusFeedback(strBaseUrl, strAppId: strAppId, nReminderNumber: nReminderNumber, strUserId: strUserId, strUserName: strUserName, strUserEmail: strUserEmail, isAllowMultipleFeedbacks: isAllowMultipleFeedbacks, tagParameters: tagParameters, isMoreImageBlackElseWhite : isMoreImageBlackElseWhite, isCopyEnabled : isCopyEnabled, isShareEnabled: isShareEnabled, viewController: viewController)

1.b Open Conversation from URL

LitmusCXViewController.fnOpenWebUrl(strWebUrl, isMoreImageBlackElseWhite : isMoreImageBlackElseWhite, isCopyEnabled : isCopyEnabled, isShareEnabled: isShareEnabled, viewController: viewController)

2. Initiate a conversation in a Dialog

2.a Open Conversation from App id

LitmusCXDialogView.fnOpenLitmusFeedback(strBaseUrl, strAppId: strAppId, nReminderNumber: nReminderNumber, strUserId: strUserId, strUserName: strUserName, strUserEmail: strUserEmail, isAllowMultipleFeedbacks: isAllowMultipleFeedbacks, tagParameters: tagParameters, isMoreImageBlackElseWhite : isMoreImageBlackElseWhite, isCopyEnabled : isCopyEnabled, isShareEnabled: isShareEnabled, viewController: viewController)

2.b Open Conversation from URL

LitmusCXDialogView.fnOpenWebUrl(strWebUrl, isMoreImageBlackElseWhite : isMoreImageBlackElseWhite, isCopyEnabled : isCopyEnabled, isShareEnabled: isShareEnabled, viewController: viewController)

Objective C

#import <LitmusCXLibrary/LitmusCXLibrary-Swift.h>

1.a Open Conversation from App id

[LitmusCXViewController fnOpenLitmusFeedback:strBaseUrl strAppId:strAppId nReminderNumber:nReminderNumber strUserId:strUserId strUserName:strUserName strUserEmail:strUserEmail isAllowMultipleFeedbacks:isAllowMultipleFeedbacks tagParameters:tagParameters isMoreImageBlackElseWhite:isMoreImageBlackElseWhite isCopyEnabled:isCopyEnabled isShareEnabled:isShareEnabled viewController:viewController];

1.b Open Conversation from URL

[LitmusCXViewController fnOpenWebUrl:strWebUrl isMoreImageBlackElseWhite:isMoreImageBlackElseWhite isCopyEnabled:isCopyEnabled isShareEnabled:isShareEnabled viewController:viewController];

2. Initiate a conversation in a Dialog

2.a Open Conversation from App id

[LitmusCXDialogView fnOpenLitmusFeedback:strBaseUrl strAppId:strAppId nReminderNumber:nReminderNumber strUserId:strUserId strUserName:strUserName strUserEmail:strUserEmail isAllowMultipleFeedbacks:isAllowMultipleFeedbacks tagParameters:tagParameters isMoreImageBlackElseWhite:isMoreImageBlackElseWhite isCopyEnabled:isCopyEnabled isShareEnabled:isShareEnabled viewController:viewController];

2.b Open Conversation from URL

[LitmusCXDialogView fnOpenWebUrl:strWebUrl isMoreImageBlackElseWhite:isMoreImageBlackElseWhite isCopyEnabled:isCopyEnabled isShareEnabled:isShareEnabled viewController: viewController];

Where -

  • strBaseUrl = Base url to be used to get conversation url (Optional)
  • strAppId = Application feedback Id (To be provided by litmus)
  • nReminderNumber = Reminder Number (-1 will call Api every time)
  • strUserId = User Id (Required)
  • strUserName = User Name (Optional)
  • strUserEmail = Email Id of the user (Optional)
  • isAllowMultipleFeedbacks = true if multiple feedback is given by same user, false otherwise
  • tagParameters = Dictionary with key-value pairs to be sent with above conversation (Optional)
  • viewController = UIViewController instance from which it is called
  • strWebUrl = URL link to be opened in Webview
  • isMoreImageBlackElseWhite = true if you want More Image (Image with 3 dots) as Black in color, false in case of White color
  • isCopyEnabled = true if Copy option is enabled in more option, false otherwise
  • isShareEnabled = true if Share option is enabled in more option, false otherwise

Author

Fenil15, [email protected]

License

LitmusCXLibrary is available under the Apache License, Version 2.0. See the LICENSE file for more info.