Skip to content

Commit

Permalink
Release v8.0.5
Browse files Browse the repository at this point in the history
Release v8.0.5
  • Loading branch information
yeskay-zohocorp committed Feb 12, 2024
1 parent ddc34db commit 6233bd4
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 17 deletions.
92 changes: 77 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![SupportedLanguages](https://img.shields.io/badge/Platforms-iOS%20%7C%20%20Android-green.svg)](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-installation.html) [![Version](https://img.shields.io/badge/version-8.0.4-blue.svg)](https://mobilisten.io/) [![Mobilisten NPM CD](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/workflows/Mobilisten%20NPM%20CD/badge.svg)](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/actions)
[![SupportedLanguages](https://img.shields.io/badge/Platforms-iOS%20%7C%20%20Android-green.svg)](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-installation.html) [![Version](https://img.shields.io/badge/version-8.0.5-blue.svg)](https://mobilisten.io/) [![Mobilisten NPM CD](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/workflows/Mobilisten%20NPM%20CD/badge.svg)](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/actions)

# React Native module for SalesIQ Mobilisten SDK

Expand Down Expand Up @@ -28,42 +28,104 @@ react-native link react-native-zohosalesiq-mobilisten

#### Installation steps for iOS

1. Navigate to the **ios** folder in the project directory and open **Podfile**.
Add the "**/ios**" to the path for the **RNZohoSalesIQ** pod as shown below.
1. Navigate to the `ios` folder in the project directory and open **Podfile**.
Add the "**/ios**" to the path for the `RNZohoSalesIQ` pod as shown below.

```diff
- pod 'RNZohoSalesIQ', :path => '../node_modules/react-native-zohosalesiq-mobilisten'
+ pod 'RNZohoSalesIQ', :path => '../node_modules/react-native-zohosalesiq-mobilisten/ios'
```

2. Run the `pod repo update && pod install` command from the **ios** directory.
2. Run the `pod repo update && pod install` command from the `ios` directory.

#### Installation steps for Android

1. Navigate to the **android** folder within the project directory using Android Studio or any other platform of choice for Android development.
Add the following maven repository to the **build.gradle** file.
```ruby
1. If you're using React Native v0.60 or above, the dependency will be linked automatically without
any steps being taken.

#### Android: Auto linking with React Native v0.59 and below

```
$ react-native link react-native-zohosalesiq-mobilisten
```

#### Android: Manual linking with React Native v0.59 and below

- Add the below code to the `android/settings.gradle`

```Gradle
include ':react-native-zohosalesiq-mobilisten'
project(':react-native-zohosalesiq-mobilisten').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zohosalesiq-mobilisten/android')
```

- Implement the dependency in the `android/app/build.gradle` file inside `dependencies`

```Gradle
implementation project(':react-native-zohosalesiq-mobilisten')
```

- Add the below snippet to `android/app/src/main/java/com/module_name/MainApplication.java` if the
packages were not auto-generated.

```java
private final ReactNativeHost mReactNativeHost=new ReactNativeHost(this){
// ...
@Override
protected List<ReactPackage> getPackages(){
// Add new RNZohoSalesIQPackage() into the React packages list like below
return new ArrayList<>(Arrays.<ReactPackage>asList(new RNZohoSalesIQPackage()));
}
// ...
};

@Override
public ReactNativeHost getReactNativeHost(){
return mReactNativeHost;
}
```

2. Navigate to the `android` folder within the project directory using Android Studio or any other
platform of choice for Android development.
Add the following maven repository to the `build.gradle` file.

```Gradle
allprojects {
repositories {
.....
// ...
maven { url 'https://maven.zohodl.com' }
}
}
```
2. Click **Sync Now** from the toolbar on the IDE.

3. Click `Sync Now` from the toolbar on the IDE.

## Initializing Mobilisten

1. Generate `App` and `Access` keys for iOS and Android platforms by providing your bundle id.
2. Use the **ZohoSalesIQ.init** API with keys for each platform as shown below.
2. Use the `ZohoSalesIQ.initWithCallback` API with keys for each platform as shown below.

```js
import { ZohoSalesIQ } from 'react-native-zohosalesiq-mobilisten';

if (Platform.OS === 'ios'){
ZohoSalesIQ.init("ios_app_key","ios_access_key");
}else{
ZohoSalesIQ.init("android_app_key","android_access_key");
let appKey;
let accessKey;

if (Platform.OS === 'ios') {
appKey = "ios_app_key";
accessKey = "ios_access_key";
} else {
appKey = "android_app_key";
accessKey = "android_access_key";
}

ZohoSalesIQ.initWithCallback(appKey, accessKey, success => {
// Your code
});
```
3. If you wish to show the default chat launcher, use the [**ZohoSalesIQ.Launcher.show()**](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-launcher-show.html) API (Optional).

3. If you want to show the default chat launcher, use the [**ZohoSalesIQ.Launcher.show()
**](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-launcher-show.html)
API (Optional).

## API Documentation
You can find the list of all APIs and their documentation [here](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-add-event-listener.html) under the **API Reference** section.
2 changes: 1 addition & 1 deletion components/zohosalesiqJSWrapper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { NativeModules, Dimensions } = require('react-native'); //No I18N
const { NativeModules, Dimensions, Platform } = require('react-native'); //No I18N
const { RNZohoSalesIQ } = NativeModules;
import { NativeEventEmitter } from 'react-native'; //No I18N
const emitter = new NativeEventEmitter(RNZohoSalesIQ);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-zohosalesiq-mobilisten",
"version": "8.0.4",
"version": "8.0.5",
"description": "A React Native module for the ZohoSalesIQ Mobilisten SDK",
"bugs": {
"email": "[email protected]"
Expand Down

0 comments on commit 6233bd4

Please sign in to comment.