Skip to content

Commit 5775b03

Browse files
author
Robert Murray
committed
Updated the README and package.json
1 parent 95cbdb5 commit 5775b03

File tree

3 files changed

+59
-18
lines changed

3 files changed

+59
-18
lines changed

README.md

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,38 @@ Simple module that allows displaying Zopim Chat from Zendesk for React Native.
44

55
## VERSIONS
66

7-
For RN version higher than 0.30 use version >= 0.1.x
7+
For RN version higher than 0.59 use version >= 0.3.0
88

9-
For RN version lower than 0.30 use version 0.0.2.
9+
For RN version lower than 0.59 use version <= 0.2.2
1010

11-
Since version 0.2.0 `department` is set to `ZDCPreChatDataRequiredEditable`.
11+
## Known Issues
1212

13-
## Known issues
14-
15-
I could not find how to make the import for iOS work properly since I'm using Cocoapods for Zendesk, if you have a suggestion that would be great.
16-
17-
## Getting started
13+
## Getting Started
1814

1915
Follow the instructions to install the SDK for [iOS](https://developer.zendesk.com/embeddables/docs/ios-chat-sdk/introduction) and [Android](https://developer.zendesk.com/embeddables/docs/android-chat-sdk/introduction).
2016

2117
### Manual install
18+
19+
1. With npm:
20+
21+
`npm install react-native-zendesk-chat --save`
22+
23+
or with yarn:
24+
25+
`yarn add react-native-zendesk-chat`
26+
2227
#### iOS
23-
1. `npm install react-native-zendesk-chat --save`
24-
2. In Xcode, drag and drop `node_modules/react-native-zendesk-chat/RNZendeskChat.m` and `node_modules/react-native-zendesk-chat/RNZendeskChat.h` into your project.
28+
29+
2. Add a reference to your Podfile:
30+
31+
`pod 'RNZendeskChat', :git => 'https://github.com/robertmurray/react-native-zendesk-chat.git'`
32+
33+
then run pod install: `(cd ios; pod install)`
34+
35+
or manually:
36+
37+
In Xcode, drag and drop `node_modules/react-native-zendesk-chat/RNZendeskChat.m` and `node_modules/react-native-zendesk-chat/RNZendeskChat.h` into your project.
38+
2539
3. Configure `ZDCChat` in `AppDelegate.m`:
2640

2741
```
@@ -31,10 +45,16 @@ Follow the instructions to install the SDK for [iOS](https://developer.zendesk.c
3145
```
3246

3347
#### Android
34-
1. `npm install react-native-zendesk-chat --save`
48+
3549
2. Open up `android/app/main/java/[...]/MainApplication.java`
36-
- Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file
37-
- Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method
50+
51+
- Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file
52+
- Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method
53+
54+
2. Open up `android/app/main/java/[...]/MainActivity.java`
55+
56+
- Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file
57+
- Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method
3858

3959
3. Append the following lines to `android/settings.gradle`:
4060

@@ -57,9 +77,13 @@ ZopimChat.init("YOUR_ZENDESK_ACCOUNT_KEY").build();
5777

5878
## Usage
5979

60-
In your code add `import ZendeskChat from 'react-native-zendesk-chat';`.
80+
In your code add:
6181

6282
```
83+
import ZendeskChat from 'react-native-zendesk-chat
84+
85+
...
86+
6387
ZendeskChat.startChat({
6488
name: user.full_name,
6589
email: user.email,
@@ -71,5 +95,9 @@ ZendeskChat.startChat({
7195

7296
## TODO
7397

74-
* Allow setting form configuration from JS
75-
* Add examples
98+
- Allow setting form configuration from JS
99+
- Add examples
100+
101+
## License
102+
103+
React Native is MIT licensed, as found in the [LICENSE](https://github.com/taskrabbit/react-native-zendesk-chat/LICENSE) file.

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-zendesk-chat",
3-
"version": "0.2.2",
3+
"version": "0.3.0",
44
"description": "React Native Wrapper around Zopim Zendesk Chat",
55
"main": "index.js",
66
"repository": {
@@ -16,6 +16,15 @@
1616
"android",
1717
"react-component"
1818
],
19+
"homepage": "https://github.com/taskrabbit/react-native-zendesk-chat.git",
20+
"bugs": "https://github.com/taskrabbit/react-native-zendesk-chat/issues",
1921
"author": "jrichardlai",
20-
"license": "MIT"
22+
"contributors": [
23+
"Robert Murray <rmurray@taskrabbit.com>"
24+
],
25+
"license": "MIT",
26+
"peerDependencies": {
27+
"react": "^16.11.0",
28+
"react-native": "^0.60.0"
29+
}
2130
}

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

0 commit comments

Comments
 (0)