@pagopa/io-react-native-cie-pid
v0.1.4
Published
A RN library for pid issuing based on native IPZS SDK
Downloads
23
Readme
⚡️ @pagopa/io-react-native-cie-pid
A RN library for pid issuing based on native IPZS Android SDK (iOS will be available soon)
Installation
npm install @pagopa/io-react-native-cie-pid
Usage
import CieManager from '@pagopa/io-react-native-cie-pid';
// ...
const startCieManager = async () => {
try {
await CieManager.start();
await CieManager.onEvent(handleCieEvent);
await CieManager.onError(handleCieError);
await CieManager.onSuccess(handleCieSuccess);
} catch (error) {
console.error(error);
}
};
const stopCieManager = async () => {
try {
await CieManager.stopListeningNFC();
await CieManager.removeAllListeners();
setCieStarted(false);
} catch (error) {
console.error(error);
}
};
Example
You can use the sample app to test and understand how to use the library.
cd example
yarn install
cd ios && bundler exec pod install && cd ..
# To use iOS
yarn ios
# To use Android
yarn android
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library