GithubHelp home page GithubHelp logo

taskrabbit / react-native-zendesk-chat Goto Github PK

View Code? Open in Web Editor NEW
130.0 17.0 126.0 242 KB

React Native Wrapper around Zendesk Chat v2

License: MIT License

Java 67.14% JavaScript 2.89% Objective-C 27.55% Ruby 2.43%
zendesk react-native support chat

react-native-zendesk-chat's Introduction

react-native-zendesk-chat

Simple module that supports displaying Zendesk Chat within a React Native Application.

This library assumes you're familiar with Zendesk's Official Documentation: iOS and Android.

VERSIONS

  • For Zendesk Chat v2 use version >= 0.4.0 (this requires RN 0.59 or later!)
  • For RN version >= 0.59 use version >= 0.3.0 (Zendesk Chat v1)
  • For RN version < 0.59 use version <= 0.2.2 (Zendesk Chat v1)

Known Issues

Getting Started

With npm:

npm install react-native-zendesk-chat --save

or with yarn:

yarn add react-native-zendesk-chat

QuickStart & Usage

  1. Setup Native Dependencies
    iOS If you're on react-native >= 0.60 and you have Cocoapods setup, then you just need to:
$ yarn install # and see if there are any errors
$ (cd ios; pod install) # and see if there are any errors
 # -- you may need to do `pod install --repo-update`

If you're on older react-native versions, please see the Advanced Setup section below

Android If you're on react-native >= 0.60, Android should autodetect this dependency. If you're on 0.59, you may need to call react-native link

  1. Call the JS Initializer:
import ZendeskChat from "react-native-zendesk-chat";

// Once in your application:
ZendeskChat.init("YOUR_ZENDESK_ACCOUNT_KEY");

// Optionally specify the appId provided by Zendesk
ZendeskChat.init("YOUR_ZENDESK_ACCOUNT_KEY", "APP_ID_PROVIDED_BY_ZENDESK");
  1. Show the Chat UI
// On button press, when you want to show chat:
ZendeskChat.startChat({
	name: user.full_name,
	email: user.email,
	phone: user.mobile_phone,
	tags: ["tag1", "tag2"],
	department: "Your department",
	// The behaviorFlags are optional, and each default to 'true' if omitted
	behaviorFlags: {
		showAgentAvailability: true,
		showChatTranscriptPrompt: true,
		showPreChatForm: true,
		showOfflineForm: true,
	},
	// The preChatFormOptions are optional & each defaults to "optional" if omitted
	preChatFormOptions: {
		name: !user.full_name ? "required" : "optional",
		email: "optional",
		phone: "optional",
		department: "required",
	},
	localizedDismissButtonTitle: "Dismiss",
});

Obtaining the YOUR_ZENDESK_ACCOUNT_KEY

To optain your zendesk account key see the instructions in Initializing the SDK in the Zendesk SDK.

To get your account key, follow these steps:

  1. In the Zendesk Chat Dashboard, click on your profile in the upper right corner and click on the 'Check Connection' option: status_dropdown
  2. In the dialog, copy the account key value account_key

Styling

Changing the UI Styling is mostly achieved through native techniques.

On Android, this is the official documentation -- and an example might be adding these 3 lines to your app theme

While on iOS, the options are more minimal -- check the official doc page

Migrating

From react-native-zendesk-chat <= 0.3.0

To migrate from previous versions of the library, you should probably remove all integration steps you applied, and start over from the Quick Start.

The JS API calls are very similar, with mostly additive changes.

Advanced Setup

Advanced users, or users running on older versions of react-native may want to initialize things in native.

iOS: Manually Setting up with Cocoapods

If you're on iOS < 0.60, you may need to manually install the cocoapod:

Add a reference to your Podfile:

pod 'RNZendeskChat', :git => 'https://github.com/taskrabbit/react-native-zendesk-chat.git'

then run pod install: (cd ios; pod install)

or manually:

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.

iOS: Configure ZDCChat in AppDelegate.m:

#import <ZDCChat/ZDCChat.h>

// ...

// Inside the appropriate appDidFinishLaunching method
[ZDCChat initializeWithAccountKey:@"YOUR_ZENDESK_ACCOUNT_KEY" appId:"YOUR_ZENDESK_APP_ID"];

// And access other interesting APIs

Android: Manual Setup & Configuration

If you're on react-native < 0.60, you should be able to call react-native link.

If this doesn't work, then you may need to do a complete manual install as follows:

  1. Open up android/app/main/java/[...]/MainApplication.java
  • Add import com.taskrabbit.zendesk.*; to the imports at the top of the file
  • Add new RNZendeskChatPackage(this) to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
include ':react-native-zendesk-chat'
project(':react-native-zendesk-chat').projectDir = new File(rootProject.projectDir,	'../node_modules/react-native-zendesk-chat/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:

For RN >= 0.60:

dependencies {
	//
  api group: 'com.zendesk', name: 'chat', version: '2.2.0'
  api group: 'com.zendesk', name: 'messaging', version: '4.3.1'

also in project build.gradle

Add gradle maven { url 'https://zendesk.jfrog.io/zendesk/repo' }

For RN < 0.60:

compile project(':react-native-zendesk-chat')
  1. Configure Chat in android/app/main/java/[...]/MainActivity.java
// Note: there is a JS method to do this -- prefer doing that! -- This is for advanced users only.

// Call this once in your Activity's bootup lifecycle
Chat.INSTANCE.init(mReactContext, key, appId);

Contributing

  • Pull Requests are encouraged!
  • Be respectful!
  • The trunk branch of this repo is called main

License

React Native Zendesk Chat is MIT licensed, as found in the LICENSE file.

react-native-zendesk-chat's People

Contributors

acarpe avatar beastcn avatar bleonard avatar d-moreira avatar dependabot[bot] avatar emkman avatar fbartho avatar gabimoncha avatar gabrielperales avatar jrichardlai avatar kuntajts avatar mikach avatar misogl avatar nyanpasu avatar olkeene avatar podotki avatar robertmurray avatar sandromachado avatar thanhcuong1990 avatar vivekneel avatar yasicmd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-zendesk-chat's Issues

iOS ignores name and tags options

Our app runs into issues similar to #65 but with iOS instead. Works fine on Android.

  • react-native-zendesk-chat: v0.4.0
  • iOS version: 13.7

Thanks!

Android install steps are missing a detail

Hello,
The README doesn't specify where exactly should I put the following line
ZopimChat.init("YOUR_ZENDESK_ACCOUNT_KEY").build();

I have some trouble building the project for Android.

I'm using ReactNative with ExpoKIT 0.35

Android app crashes on start chat function call

following is code i have written in componentDidMount function of my RN component.

ZendeskChat.init('MY_KEY').build();
    let chat = {
      name: 'name',
      email: 'email',
      phone: '234124234',
    };
ZendeskChat.startChat(chat);

It works perfectly fine for iOS.

I run react-native link react-native-zendesk-chat to link libraries.

linker command failed with exit code 1

i try install to ios
i got this issue #21
and make this staps:
Libraries/RNZendeskChat.xcodeproj > Build Settings > Framework Search Paths
Add: "${SRCROOT}/../../../ios/Pods/ZDCChat" (recursive)

a got this error
image

'RCTBridgeModule.h' file not found

I have this error after the installation of this module:

project/ios/RNZendeskChatModule.h:3:9: 'RCTBridgeModule.h' file not found

XCode can't build.

Unable to find a specification for `ZendeskChatSDK`

I followed the instructions from the README, and when I run pod install this error shows up:

[!] Unable to find a specification for `ZendeskChatSDK` depended upon by `RNZendeskChat`

I just eject my react expo app, and I don't know if that can have something to be with the issue

Could not find com.zopim.android:sdk:1.4.8

Hi!, I get the follow error when I want to build an Android release version:
Could not find com.zopim.android:sdk:1.4.8.

This are my packages:

    "react": "16.8.3",
    "react-native": "0.59.9",
    "react-native-zendesk-chat": "^0.3.1"

Forgot any steps in installation?

use of undeclared identifier 'ZDKFormFieldStatusRequired' 'ZDKFormFieldStatusOptional' 'ZDKFormFieldStatusHidden'

I'm trying to compile my project for iOS following the instructions, and I'm getting these errors:

Showing All Errors Only
/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:22:20: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:24:24: Use of undeclared identifier 'ZDKFormFieldStatusRequired'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:25:24: Use of undeclared identifier 'ZDKFormFieldStatusOptional'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:26:22: Use of undeclared identifier 'ZDKFormFieldStatusHidden'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:28:8: Use of undeclared identifier 'ZDKFormFieldStatusOptional'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:38:1: Unknown type name 'ZDKChatAPIConfiguration'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:54:4: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:54:81: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:74:4: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:93:4: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:110:4: Expected a type

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:51:2: Use of undeclared identifier 'ZDKChat'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:51:121: Use of undeclared identifier 'ZDKChatAPIConfiguration'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:56:10: Property 'department' not found on object of type '__strong id'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:59:10: Property 'tags' not found on object of type '__strong id'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:61:9: Property 'visitorInfo' not found on object of type '__strong id'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:61:25: Use of undeclared identifier 'ZDKVisitorInfo'

/Users/xxxxxxx/workspace/xxxxxxx/node_modules/react-native-zendesk-chat/ios/RNZendeskChatModule.m:65:119: Property 'department' not found on object of type '__strong id'


This is my system info just in case it can be helpful

System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 400.92 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node
    Yarn: 1.15.2 - ~/.yarn/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.5.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: 14.0.1 - /usr/bin/javac
    Python: 2.7.15 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: ~16.9.0 => 16.9.0
    react-native: ~0.61.5 => 0.61.5
  npmGlobalPackages:
    *react-native*: Not Found

build.gradle issue in version 3.0 (Android)

The configuration is wrong for android
node_modules/react-native-zendesk-chat/android/build.gradle

buildscript {
  repositories {
    jcenter()
  }

  dependencies {
    google()
    classpath 'com.android.tools.build:gradle:3.2.1'
  }
}

The solution is to move google() from dependencies to repositories

buildscript {
  repositories {
    jcenter()
  google()
  }

  dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
  }
}

IOS - ZDCChat/ZDCChat.h not found

I added ZDCChat via pod install but inside the RNZendeskChatModule.m
it cannot find the ZDCChat/ZDCChat.h. Anyone also have this issue or encountered
this before? thank you very much.

Styling Android's actionbar

Can't figure out how to get our style reflected in the Actionbar

Our app style has white toolbar background, and black text:
(Blue accent can be black if not possible)
screen shot 2018-04-24 at 20 37 32

I've tried ALL POSSIBLE COMBINATIONS inside chat_style.xml but all I can get is black toolbar with white text, or white toolbar with white text (invisible text)

    <style name="zopim_toolbar">
        <item name="android:background">?attr/colorPrimary</item>
        <item name="android:minHeight">?attr/actionBarSize</item>
       <!-- Tried Light, and Dark here, Theme, ThemeOverlay, Material etc -->
        <item name="android:theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
       <!-- Tried Light, and Dark here, Theme, ThemeOverlay, Material etc -->
        <item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
       <!-- Tried android:textColor -->
       <!-- Tried android:textColorPrimary -->
    </style>

No idea what to do :/

screen shot 2018-04-24 at 20 42 32
I want this inverted! :)

Keyboard aware view on IOS

Hello,

i'm initializing chat like this

ZendeskChat.startChat({})

on IOS keyboard overlap text box and user unable to see whole message

How we can fix this ?

Screen Shot 2020-03-11 at 5 09 04 PM_censored

Screen Shot 2020-03-11 at 5 15 30 PM_censored

startChat not respecting name and email on Android

Hi, we have a app that is being built for iOS and Android, on iOS I've been able to set user name and email so I can identify him on Zendesk chat dashboard, but on android the user is always handled as a Visitor.

Been calling startChat like:

        onPress: () =>
          ZendeskChat.startChat({
            department: 'App',
            localizedDismissButtonTitle: 'Voltar',
            name: 'User Name',
            email: '[email protected]',
          })

The department is correctly selected, but on Android the user is always a visitor.

react/PackageList.java:17: error: cannot find symbol

Users/shashank/Desktop/ZendeskAndroid/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:17: error: cannot find symbol
import com.taskrabbit.zendesk.RNZendeskChat.RNZendeskChatPackage;
^
symbol: class RNZendeskChatPackage
location: package com.taskrabbit.zendesk.RNZendeskChat
/Users/shashank/Desktop/ZendeskAndroid/android/app/src/main/java/com/zendeskandroid/MainApplication.java:46: error: cannot find symbol
ZopimChat.init("YOUR_ZENDESK_ACCOUNT_KEY").build();
^
symbol: variable ZopimChat
location: class MainApplication
/Users/shashank/Desktop/ZendeskAndroid/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:51: error: cannot find symbol
new RNZendeskChatPackage()
^
symbol: class RNZendeskChatPackage
location: class PackageList
3 errors

FAILURE: Build failed with an exception.

Facing the above issues when running on android. Any Fix for this?
react-native: 0.60.0

Android - ZendeskChat.startChat function with `department` key is not working as per functionality

Issue:- For android while initiating the chat with below constructor notice that department value is not passed to API properly.

ZendeskChat.startChat({
name: {firstName} ${lastName},
email,
phone: mobileNumber,
department: Some Value
})

As per functionality, it should navigate to correct Department in case if the department is not under a working hour or no agent is available it should show the same message as in iOS.

IOS Intergration

I'm facing this issue while trying to pod install, any idea what's that means require a higher minimum deployment target

[!] CocoaPods could not find compatible versions for pod "RNZendeskChat":
In Podfile:
RNZendeskChat (from ../node_modules/react-native-zendesk-chat)

Specs satisfying the RNZendeskChat (from ../node_modules/react-native-zendesk-chat) dependency were found, but they required a higher minimum deployment target.

Where do I start chat?

Where do I put this code?

ZendeskChat.startChat({ name: user.full_name, email: user.email, phone: user.mobile_phone, tags: ['tag1', 'tag2'], department: "Your department" });

in componentDidMount?

How to initialize different account key for ios?

For ios initialization, we can do this only for one key.
[ZDCChat initializeWithAccountKey:@"accountkey"];

How I able to initialize from react native?. I manage to get it works as the code shown below only for android, but not ios. I need to based on a props value to determine which account key should apply.

if (props === 'A') {
ZendeskChat.init('accountKeyA');
}  else {
ZendeskChat.init('accountKeyB');
}

Please help

isAgentAvailabilityEnabled flag issue

When isAgentAvailabilityEnabled = true, and if the agent set the status to Away in Zendesk-portal, user can't type the message in mobile text-area.
Expected : The user able to send the msg and it should be queued until the agent is online.

Note: When isAgentAvailabilityEnabled = false, then offline-form is not shown.

ITMS-90809: Deprecated API Usage UIWebView

When submitting app to app store we are getting following deprecation warning from apple.
Issue Description:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
As per apple documentation they said that app publishing is prohibited from 1st April 2020 and They will also stop updates to existing application having UIWebview from December 2020.
Traces of UIWebview are found in ZDCChat framework.
As release notes from zendesk they said that they resolved the error in v2 for zendesk chat sdk.

Please let us know the plan for (react-native-zendesk-chat) when you are going to migrate to v2.

Need to add dependencies for Android integration that might be redundant

While trying to build the package for Android I had to make the following additions -

in android/app/build.gradle

dependencies {
    ...
    implementation group: "com.zopim.android", name: "sdk", version: '1.4.8'
    ...
}

in android/build.gradle

allprojects {
    repositories {
       ...
        maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
    }
}

Without these changes I was getting errors while building for android -

.../MainActivity.java:17: error: cannot find symbol
import com.zopim.android.sdk.api.ZopimChat;
                                ^
  symbol:   class ZopimChat
  location: package com.zopim.android.sdk.api
.../MainActivity.java:137: error: cannot find symbol
        ZopimChat.init(zendesk_key);
        ^
  symbol:   variable ZopimChat
  location: class MainActivity
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

These same changes seem to already be in this package's code.
See: https://github.com/taskrabbit/react-native-zendesk-chat/blob/master/android/build.gradle

Now I'm not too familiar with Android, but it seems like I should not be needed these changes since the dependencies are already defined with the package.

[iOS] Archive Failed

Hi @fbartho
This library is exactly what I was looking for to integrate Zendesk Chat V2 in my App ❤️ !
In dev mode everything works fine, unfortunately when I try to build an iOS release, the archive failed, here is the log :

The following build commands failed:
	PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/pax/Library/Developer/Xcode/DerivedData/MyProduct-ewouwhypkycamggxraskzrjneljg/Build/Intermediates.noindex/ArchiveIntermediates/MyProduct-Staging/IntermediateBuildFilesPath/MyProduct.build/Release-iphoneos/MyProduct.build/Script-6439D71AABAE32D52EC1D8F6.sh
(1 failure)
[16:13:37]: Exit status: 65

+---------------+-------------------------+
|            Build environment            |
+---------------+-------------------------+
| xcode_path    | /Applications/Xcode.app |
| gym_version   | 2.156.1                 |
| export_method | ad-hoc                  |
| sdk           | iPhoneOS13.6.sdk        |
+---------------+-------------------------+

[16:13:37]: ▸ Stripped /Users/pax/Library/Developer/Xcode/DerivedData/MyProduct-ewouwhypkycamggxraskzrjneljg/Build/Intermediates.noindex/ArchiveIntermediates/MyProduct-Staging/InstallationBuildProductsLocation/Applications/MyProduct - staging.app/Frameworks/ChatProvidersSDK.framework/ChatProvidersSDK of architectures: x86_64 i386
[16:13:37]: ▸ Code Signing /Users/pax/Library/Developer/Xcode/DerivedData/MyProduct-ewouwhypkycamggxraskzrjneljg/Build/Intermediates.noindex/ArchiveIntermediates/MyProduct-Staging/InstallationBuildProductsLocation/Applications/MyProduct - staging.app/Frameworks/ChatProvidersSDK.framework with Identity Apple Distribution: XXXX (XXXXXXXXXX)
[16:13:37]: ▸ /usr/bin/codesign --force --sign XXXX  --preserve-metadata=identifier,entitlements '/Users/pax/Library/Developer/Xcode/DerivedData/MyProduct-ewouwhypkycamggxraskzrjneljg/Build/Intermediates.noindex/ArchiveIntermediates/MyProduct-Staging/InstallationBuildProductsLocation/Applications/MyProduct - staging.app/Frameworks/ChatProvidersSDK.framework'
[16:13:37]: ▸ /Users/pax/xxx/MyProduct/ios/Pods/Target Support Files/Pods-MyProduct/Pods-MyProduct-frameworks.sh: eval: line 133: unexpected EOF while looking for matching `''
[16:13:37]: ▸ Command PhaseScriptExecution failed with a nonzero exit code

I follow the Zendesk SDK Official documentation, so I put the additionnal "Run Script Phase" add the end of the Build Phases:
"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/ChatSDK.framework/strip-frameworks.sh"

The error occured in the step before "[CP] Embed Pods Frameworks", so do I need to put the "Strip slices from fat frameworks" run script before ? I tried but without success ..

any idea ?

Terminating with uncaught exception of type NSException

Hello,

I was able to install this module in React Native and I manage to compile the iOS application but when I run Zendesk.startChat, the physical phone freeze, the simulator phone crash and Xcode gets me the following error:

libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Does anyone have a solution to this problem?

Thanks,
Blaise

Certain trigger does not work properly with react-native-zendesk-chat

The image below is a trigger for automated greeting without starting a chat. (I also disable prechat form.) It basically looks for widget being loaded as a condition. My problem is that this trigger does not work with this module and I can't really figure out why.

I opened a case with Zopim and it appears the issue is that the widget is never unloaded when "end chat" is pressed. I tried the same thing on Zopim iOS example app, it works just fine. Which puzzles me because "end chat" is not a button that the module controls. The module simply starts the chat then leave the rest to the lib, same as the iOS example. (https://github.com/zendesk/zendesk_sdk_chat_ios) The framework does all the magic.

I am wondering if anyone knows why that could be an issue. Thanks.

image

Execution failed for task ':app:mergeDebugResources'.

Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
/Users/sudhirmurthy/.gradle/caches/transforms-1/files-1.1/sdk-1.3.0.1.aar/128f52f50bb30f6f326d9f255f9d3d8d/res/layout/zopim_offline_message_fragment.xml:24: error: id 'id/..' has an invalid entry name.
/Users/sudhirmurthy/.gradle/caches/transforms-1/files-1.1/sdk-1.3.0.1.aar/128f52f50bb30f6f326d9f255f9d3d8d/res/layout/zopim_offline_message_fragment.xml:39: error: id 'id/..' has an invalid entry name.

I'm using RN version 0.57.8 and android studio 3.3, gradle version 4.10.1
There seems to be a problem with react-native-zendesk-chat. Can you please help ?

No camera or photos permissions on IOS

Hi there

I am trying to use this and whilst the chat bit works really well, whenever I try to send a photo or access one from my camera roll I only get a black screen, it sends a black image to zendesk successfully though. Checking permissions shows that I am denied access to both the camera and the camera roll. I never get the permissions request popup when using this.

Could not resolve all files for configuration ':app:debugCompileClasspath'.

Hi, I have installed "react-native-zendesk-chat": "^0.4.0"

I am on "react-native": "0.59.2", and have been trying to set it up on my mobile app via react-native run-android, but I am receiving the following error when I am trying to do so.
`

  • What went wrong:
    Could not resolve all files for configuration ':app:debugCompileClasspath'.

Could not find com.zendesk:chat:2.2.0.
Required by:
project :app
project :app > project :react-native-zendesk-chat
Could not find com.zendesk:messaging:4.3.1.
Required by:
project :app
project :app > project :react-native-zendesk-chat
`

Setup-wise, I followed the instructions in the readme for https://github.com/taskrabbit/react-native-zendesk-chat
W.r.t. https://github.com/taskrabbit/react-native-zendesk-chat#ios-manually-setting-up-with-cocoapods, I did not experience any setup errors.

w.r.t https://github.com/taskrabbit/react-native-zendesk-chat#android-manual-setup--configuration, I have tried react-native-link, but I got the same error above when trying react-native run-android.
As such, I followed the steps to do a complete manual install (for when RN < 0.60). After following the steps (except for step 4), I still encountered the same error.

Is there anything else I should try?

Bool values in options are not unwrapped

Hello!

If I pass visitor.shouldPersist = false (for setVisitorInfo) or options.emailNotRequired = false (e.g., for startChat) from JS this options[@"shouldPersist"] || NO resolves to YES when NO is expected.

To fix that we should unwrap bool value like that: [options[@"shouldPersist"] boolValue] || NO.

Got a PR to submit.

Touch events are passing to background views instead of Chat Dialog/Modal

When opening chat for the first time it is working fine. But When I end chat once and trying to open again it is opening but I could not type messages or click action buttons.I am opening it in modal so the second time when I was clicking send button / any other things the views which are in background of Modal are being clicked

Custom styles

Hello, I would like to change the style of the text, and the color of the header, is there a way ?

Thank you.

Latest RN version issue

My dependencies are
"dependencies": {
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.6.1",
"@react-navigation/stack": "^5.6.2",
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.7",
"react-native-screens": "^2.9.0",
"react-native-zendesk-chat": "^0.4.0"
},

while initializing by
ZendeskChat.init('My Key');

getting error

ould not determine the dependencies of task ':app:mergeDebugAssets'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.zendesk:chat:2.2.0.
Searched in the following locations:
- file:/Users/shauryapratap/.m2/repository/com/zendesk/chat/2.2.0/chat-2.2.0.pom
- file:/Users/shauryapratap/Documents/happ/MyTestApp/node_modules/react-native/android/com/zendesk/chat/2.2.0/chat-2.2.0.pom
- file:/Users/shauryapratap/Documents/happ/MyTestApp/node_modules/jsc-android/dist/com/zendesk/chat/2.2.0/chat-2.2.0.pom
- https://dl.google.com/dl/android/maven2/com/zendesk/chat/2.2.0/chat-2.2.0.pom
- https://jcenter.bintray.com/com/zendesk/chat/2.2.0/chat-2.2.0.pom
- https://www.jitpack.io/com/zendesk/chat/2.2.0/chat-2.2.0.pom
Required by:
project :app > project :react-native-zendesk-chat
Could not find com.zendesk:messaging:4.3.1.
Searched in the following locations:
- file:/Users/shauryapratap/.m2/repository/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
- file:/Users/shauryapratap/Documents/happ/MyTestApp/node_modules/react-native/android/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
- file:/Users/shauryapratap/Documents/happ/MyTestApp/node_modules/jsc-android/dist/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
- https://dl.google.com/dl/android/maven2/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
- https://jcenter.bintray.com/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
- https://www.jitpack.io/com/zendesk/messaging/4.3.1/messaging-4.3.1.pom
Required by:
project :app > project :react-native-zendesk-chat

Screenshots

Are there any screenshots of this in action? We are exploring possibilities for a client and just looking for an overview of what this module does,

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.