Skip to content

React Native iOS doc

Requirements

This setup assumes you have already setup your App Key on the Dashboard

See requirements.

Integration Steps

Install npm module.

npm install -save pointzi-react-ios

Link the dependency.

react-native link pointzi-react-ios

Import the Native Modules into project.

import {NativeModules} from 'react-native';

To use Pointzi in ReactNative, add nativeID into View tag. For example:

class ViewColoredBoxesWithText extends Component {
    render() {
        return (
            <View nativeID="View1"
                  style={{flexDirection: 'row',
                        height: 100,
                        padding: 20}}>
                <View style=backgroundColor: 'blue', flex: 0.3 />
                <View style=backgroundColor: 'red', flex: 0.5 />
                <Text>Hello World!</Text>
            </View>
        );
    }
}
In this example, View1 is the nativeID.

Then integration is done. Now you can design the tips in Pointzi dashboard.

Identify your app users

  • Tagging customer's unique ID
var PointziReact = NativeModules.PointziReact;
PointziReact.tagCuid('user_shcuid');
  • Tagging user's email address
var PointziReact = NativeModules.PointziReact;
PointziReact.tagString('sh_email','hello@streethawk.com');
  • Tagging user's first name
var PointziReact = NativeModules.PointziReact;
PointziReact.tagString('sh_first_name','David');