React Native bridge to Zendesk Support SDK v2 on iOS and Android.
- Add the package via yarn or npm
yarn add react-native-zendesk
npm install --save react-native-zendesk
- Link the modules to your native projects
react-native link react-native-zendesk
-
For your iOS app, add Zendesk SDK 2 via Pod, add this to your pod
pod 'ZendeskSDK'
, thenpod install
-
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"
const config = {
zendeskUrl: ZENDESK_URL,
appId: ZENDESK_APP_ID,
clientId: ZENDESK_CLIENT_ID,
};
Zendesk.initialize(config);
Zendesk.identifyAnon();
Zendesk.identifyAnon(USER_NAME, USER_EMAIL);
Zendesk.identifyJWT(USER_TOKEN);
// possible options to pass to the help center
interface Options {
hideContactSupport?: boolean
}
Zendesk.showHelpCenter(OPTIONS);