Skip to content

nagarro-dv/react-native-zendesk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-zendesk

React Native bridge to Zendesk Support SDK v2 on iOS and Android.

Installation

  1. Add the package via yarn or npm
yarn add react-native-zendesk
npm install --save react-native-zendesk
  1. Link the modules to your native projects
react-native link react-native-zendesk
  1. For your iOS app, add Zendesk SDK 2 via Pod, add this to your pod pod 'ZendeskSDK', then pod install

  2. For your iOS app, add a Run Script build phase to your app target to strip the extra architectures from the Zendesk frameworks, with the following script:

bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZendeskCoreSDK.framework/strip-frameworks.sh"

Getting Started

Initializing the Support SDK (Required)

const config = {
  zendeskUrl: ZENDESK_URL,
  appId: ZENDESK_APP_ID,
  clientId: ZENDESK_CLIENT_ID,
};

Zendesk.initialize(config);

Setting an identity (Required)

Setting an anonymous identity

Zendesk.identifyAnon();
Zendesk.identifyAnon(USER_NAME, USER_EMAIL);

Setting a unique identity

Zendesk.identifyJWT(USER_TOKEN);

Adding Help Center

// possible options to pass to the help center
interface Options {
  hideContactSupport?: boolean
}

Zendesk.showHelpCenter(OPTIONS);

About

Zendesk SDK for React Native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 48.2%
  • Swift 37.3%
  • Objective-C 13.0%
  • JavaScript 1.5%