-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version update 1.1.0 -> Reopen and multi-client chat sync support
- Loading branch information
angusamy.g
committed
Jul 7, 2020
1 parent
ae5b821
commit c411695
Showing
406 changed files
with
1,535 additions
and
8,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.