0.0.5 • Published 1 year ago

@erickcrus/react-native-device-check v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-device-check

šŸ“± Native bridge to the iOS DeviceCheck API

Introduction

DeviceCheck helps identify a particular device (per development account) and authenticate a request's origin. Check out the Apple Developer Doc for more detail. This module returns the token in base64 ready for serialization.

The API was introduced in iOS 11 and requires a physical device, running on a lower target or simulator will throw an exception.

Install

npm install @erickcrus/react-native-device-check

Usage

Async/await:

getDeviceToken = async () => {
  try {
    let token = await DeviceCheck.getDeviceToken();
  } catch (error) {
    console.log(error);
  }
}

Promise:

getDeviceToken() {
  DeviceCheck.getDeviceToken().then(token =>
    //
  ).catch(err =>
    console.log(err)
  );
}

License

MIT

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago