0.1.3 • Published 10 months ago
@pagopa/io-react-native-cie-pid v0.1.3
⚡️ @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
# To use iOS (Not supported)
# 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