Skip to content

Commit

Permalink
Version update 1.1.0 -> Reopen and multi-client chat sync support
Browse files Browse the repository at this point in the history
  • Loading branch information
angusamy.g committed Jul 7, 2020
1 parent ae5b821 commit c411695
Show file tree
Hide file tree
Showing 406 changed files with 1,535 additions and 8,781 deletions.
73 changes: 36 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
## Integrate React Native ZohoSalesIQ SDK:

Open your react-native project in the terminal and install the package using the commands as follows :
# react-native-zohosalesiq-mobilisten

- npm install react-native-zohosalesiq-mobilisten --save
- react-native link react-native-zohosalesiq-mobilisten
## Getting started

###### iOS Setup :
`$ npm install react-native-zohosalesiq-mobilisten --save`

Open **Podfile** inside the **ios** folder of your react native project.
### Automatic installation

If you don't have Podfile, run the following command from the ios folder :
`$ react-native link react-native-zohosalesiq-mobilisten`

```
pod init
```
### Manual installation

Include **ZohoSalesIQ React Native SDK** into your Podfile as follows :

```
target 'YourProjectName' do
pod 'RNZohoSalesIQ', :path => '../node_modules/react-native-zohosalesiq-mobilisten/ios/RNZohoSalesIQ.podspec'
end
```
#### iOS

Run command **pod install** from the ios directory.
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
2. Go to `node_modules``react-native-zohosalesiq-mobilisten` and add `RNZohosalesiqMobilisten.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNZohosalesiqMobilisten.a` to your project's `Build Phases``Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

**Note :**
After a successful pod install, open the iOS project in Xcode and navigate to the **Build Settings > Build Options** and set **ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES** to **Yes**
#### Android

###### Android Setup :
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNZohosalesiqMobilistenPackage;` to the imports at the top of the file
- Add `new RNZohosalesiqMobilistenPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-zohosalesiq-mobilisten'
project(':react-native-zohosalesiq-mobilisten').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zohosalesiq-mobilisten/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-zohosalesiq-mobilisten')
```

Open the android folder of your react-native project in Android Studio or any other platform for Android development.
## Usage
```javascript
import { ZohoSalesIQ } from 'react-native-zohosalesiq-mobilisten';

Add the following maven repository in the project level build.gradle file.

```
allprojects {
repositories {
.....
maven { url 'https://maven.zohodl.com' }
}
if (Platform.OS === 'ios'){
ZohoSalesIQ.init("ios_app_key","ios_access_key");
ZohoSalesIQ.setLauncherVisibility(true);
//By default, if you wish to display the chat button/bubble on the application, then use .setLauncherVisibility() API.
}
else{
ZohoSalesIQ.init("android_app_key","android_access_key");
ZohoSalesIQ.setLauncherVisibility(true);
//By default, if you wish to display the chat button/bubble on the application, then use .setLauncherVisibility() API.
}
```

Then, press **Sync Now** in the bar that appears in the IDE.


Help Doc :- [ZohoSalesIQ ReactNative SDK](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-installation.html)
3 changes: 1 addition & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ repositories {

dependencies {
compile 'com.facebook.react:react-native:+'
implementation 'com.zoho.salesiq:mobilisten:1.5-beta.4.7'
implementation 'com.zoho.salesiq:mobilisten:2.2'
}

Loading

0 comments on commit c411695

Please sign in to comment.