0.0.15 • Published 1 year ago

@airsnap/react-native v0.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

AirSnap for React Native

Setup

To install with NPM:

npm i @airsnap/react-native

To install with Yarn:

yarn add @airsnap/react-native

Install the Pod library:

pod install

Initialize the library

// App.js
import AirSnap from '@airsnap/react-native';

AirSnap.start("<api-key>")

Privacy Mask

AirSnap prioritizes privacy and therefore enables privacy masking by default. You can disable the privacy mask by passing the following parameter to AirSnap.start

AirSnap.start("<api-key>", "unmask") // "mask" or "unmask"

APIs

getSessionId

Returns the current session ID

const sessionId = await AirSnap.getSessionId()

getUserId

Returns the user ID that is used to distinguish users. This can be a custom identifier that you set, otherwise it will use the IDFV Device ID by default.

const userId = await AirSnap.getUserId()

setUserId

Sets the user ID that is used to distinguish users. This can be the internal identifier for your application. If param is an empty string or null, it will reset the identifier back to the Device ID.

AirSnap.setUserId("john.doe@airsnap.io")

// Resets user id to device id. Ex: logging out
AirSnap.setUserId("")
AirSnap.setUserId()
0.0.14

1 year ago

0.0.15

1 year ago

0.0.13

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.4

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago