Skip to content

Commit 2675202

Browse files
author
Robert Murray
committed
Updated the README and package.json
1 parent 41bd948 commit 2675202

File tree

3 files changed

+56
-18
lines changed

3 files changed

+56
-18
lines changed

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,40 @@ 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

17+
### Autolinking Install (RN > 0.62)
18+
2119
### Manual install
20+
21+
1. With npm:
22+
23+
`npm install react-native-zendesk-chat --save`
24+
25+
or with yarn:
26+
27+
`yarn add react-native-zendesk-chat`
28+
2229
#### 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.
30+
31+
2. Add a reference to your Podfile:
32+
33+
`pod 'RNZendeskChat', :git => 'https://github.com/robertmurray/react-native-zendesk-chat.git'`
34+
35+
then run pod install: `(cd ios; pod install)`
36+
37+
or manually:
38+
39+
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.
40+
2541
3. Configure `ZDCChat` in `AppDelegate.m`:
2642

2743
```
@@ -31,10 +47,11 @@ Follow the instructions to install the SDK for [iOS](https://developer.zendesk.c
3147
```
3248

3349
#### Android
34-
1. `npm install react-native-zendesk-chat --save`
50+
3551
2. Open up `android/app/main/java/[...]/MainActivity.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
52+
53+
- Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file
54+
- Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method
3855

3956
3. Append the following lines to `android/settings.gradle`:
4057

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

5875
## Usage
5976

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

6279
```
80+
import ZendeskChat from 'react-native-zendesk-chat
81+
82+
...
83+
6384
ZendeskChat.startChat({
6485
name: user.full_name,
6586
email: user.email,
@@ -71,5 +92,9 @@ ZendeskChat.startChat({
7192

7293
## TODO
7394

74-
* Allow setting form configuration from JS
75-
* Add examples
95+
- Allow setting form configuration from JS
96+
- Add examples
97+
98+
## License
99+
100+
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)