reve_chat_sdk

Creator: coderz1093

Last updated:

0 purchases

reve_chat_sdk Image
reve_chat_sdk Images
Add to Cart

Description:

reve chat sdk

reve_chat_sdk #
ReveChatSDK
Getting Started #
this plugin is for android and ios devices, it registers app to ReveChat bot with your account id
which can be found at ReveChat dashboard at integrate mobile sdk, so by setting account id
and user data to start chat with registered technical support.
Setup #
About chat colors all can be customized from ReveChat Dashboard
ReveChat => https://www.revechat.com
Android SETUP #

manifest.xml file => add
<uses-permission android:name="android.permission.INTERNET"/>
copied to clipboard

strings.xml file => add
<string name="revechatsdk_title_chat_window">specified title</string>
copied to clipboard

colors.xml file => add for ReveChat screen primary


<color name="revechatsdk_colorPrimary">color in hex</color>
copied to clipboard


<color name="revechatsdk_colorPrimaryDark">color in hex</color>
copied to clipboard




IOS SETUP #

min ios: 11
pod file => add in case of error in cdn
source 'https://github.com/CocoaPods/Specs.git'
copied to clipboard

pod file => add
use_frameworks!
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
copied to clipboard

info.plist => add

<key>NSPhotoLibraryUsageDescription</key>
<string>description to use photo library</string>
<key>NSCameraUsageDescription</key>
<string>description to use camera</string>
<key>NSAppTransportSecurity</key> <dict>
<key>NSAllowsArbitraryLoads</key>
<true/></dict>
<key>NSMicrophoneUsageDescription</key>
<string>Add your description here</string>
<key>NSCameraUsageDescription</key>
<string>Add your description here</string>
copied to clipboard

AppDelegate.swift (Required):

override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
let navC = UINavigationController(rootViewController: window.rootViewController!)
navC.isNavigationBarHidden = true
window.rootViewController = navC
window.makeKeyAndVisible()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
copied to clipboard

AppDelegate.swift => add for background notification

import UIKit
import Flutter

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
var backgroundUpdateTask: UIBackgroundTaskIdentifier = UIBackgroundTaskIdentifier(rawValue: 0)

override func applicationDidBecomeActive(_ application: UIApplication) {
application.applicationIconBadgeNumber = 0
self.endBackgroundUpdateTask()
}

override func applicationWillResignActive(_ application: UIApplication) {
self.backgroundUpdateTask = UIApplication.shared.beginBackgroundTask(expirationHandler: {
self.endBackgroundUpdateTask()
})
}

func endBackgroundUpdateTask() {
UIApplication.shared.endBackgroundTask(self.backgroundUpdateTask)
self.backgroundUpdateTask = UIBackgroundTaskIdentifier.invalid
}
}
copied to clipboard
Add the plugin into pubspec.yaml
Initialize the plugin in the main function as following:
import 'package:reve_chat_sdk/reve_chat_sdk.dart';
import 'package:reve_chat_sdk/user_model.dart';

final reveChatSdkPlugin = ReveChatSdk();

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await reveChatSdkPlugin.initReveChat(accountId);
if(Platform.isAndroid){
await reveChatSdkPlugin.setReveChatDeviceToken(deviceToken);
}
await reveChatSdkPlugin.setReveChatVisitorInfo(
UserModel(
name: username,
email: userEmailAddress,
phoneNumber: userPhoneNumber,
),
);
runApp(const MyApp());
}
copied to clipboard
How to use plugin? #
all you can do to start chatting is to call this function in onPress of button
final reveChatSdkPlugin = ReveChatSdk();
void chat() => reveChatSdkPlugin.gotoReveChat();
copied to clipboard
FAQs (General issues faced while integrating) #

I am facing the following error in console.
ld: library not found for -lAFNetworking.
Reason : in your pod file use_frameworks! line is commented.
Solution : Uncomment use_frameworks! line and build again
Getting Crash when initiating revechat sdk.
reason : the pod has been updated on the cocoa pods.
solution : run ‘pod update‘ in the terminal on your project path

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator