GithubHelp home page GithubHelp logo

adhamkhaledabdelwahab / iosrevechatsdktest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from revechatofficial/iosrevechatsdktest

0.0 0.0 0.0 19.57 MB

Test application on how to add reve chat sdk in iOS platform

JavaScript 0.85% Ruby 1.18% Objective-C 97.97%

iosrevechatsdktest's Introduction

iOSReveChatSDK

Test application on how to add reve chat sdk in iOS platform

Necessary or minimum requirements:

Xcode 7 or above iOS 8 or above

Installation

Through cocoapods. Write bellow line in your podfile.

pod 'ReveChatSDK'

iOS SDK integration process

Step 1:

To integrate iOS SDK with your iOS mobile app, please follow the below mentioned steps:

Update your plist

The iOS SDK uses the camera and photo library in iOS.

If your app does not already request permissions for these features, you should update your info.plist file with a usage description for NSPhotoLibraryUsageDescription and NSCameraUsageDescription.

<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>

Import ReveChat headers

Objective-c

#import < ReveChatSDK/ReveChatSDK.h>

Swift

import ReveChatSDK

Setup Account ID

Objective-c

[[ReveChatManager sharedManager]
setupAccountWith:<your account id>];

Swift

let reveChatManager = ReveChatManager()
reveChatManager.setupAccount(with: <your account id   as string> )

Initiate ReveChat

Objective-c

[[ReveChatManager sharedManager]
 initiateReveChatWith:<visitor name>
 visitorEmail:<visitor email>
 visitorMobile:<visitor mobile>
 onNavigationViewController:<your navigation
 controller>];

Swift

/* initiate the class with name, email , mobile and parent controller of the sdk as parameters*/
reveChatManager.initiateReveChat(with: <visitor name>,
visitorEmail: <visitor email>,
visitorMobile: <visitor mobile>,
onNavigationViewController: <UINavigationController on which you want it to load>)
*To initiate video call.The audio parameter should be false

Pass login parameter while initiate ReveChatSDK (Check LoginParamVC class in this project)

If you wish not to show prechat form if visitor logged in then pass like bellow:

Objective-c

[[ReveChatManager sharedManager]
                 initiateReveChatWith:<visitor name>
                 visitorEmail:<visitor email>
                 visitorMobile:<visitor mobile>
                 loginState: LOGGED_IN
                 onNavigationViewController:<UINavigationController on which you want it to load>];

Swift

let reveChatManager = ReveChatManager()
            reveChatManager.initiateReveChat(with: <visitor name>,
                                             visitorEmail:<visitor email>,
                                             visitorMobile: <visitor mobile>,
                                             loginState: LOGGED_IN,
                                             onNavigationViewController: <UINavigationController on which you want it to load>)

If you wish to show prechat form if visitor logged in then pass like bellow:

Objective-c

[[ReveChatManager sharedManager]
                 initiateReveChatWith:<visitor name>
                 visitorEmail:<visitor email>
                 visitorMobile:<visitor mobile>
                 loginState: LOGGED_OUT
                 onNavigationViewController:<UINavigationController on which you want it to load>];

Swift

let reveChatManager = ReveChatManager()
            reveChatManager.initiateReveChat(with: <visitor name>,
                                             visitorEmail:<visitor email>,
                                             visitorMobile: <visitor mobile>,
                                             loginState: LOGGED_OUT,
                                            onNavigationViewController: <UINavigationController on which you want it to load>)

Tutorial

For more details go to this link: https://www.revechat.com/getting-started-ios-sdk/

iosrevechatsdktest's People

Contributors

revechatofficial avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.