eSIM Installation Native Module for React Native (Expo)
A native module for managing eSIM activation and QR code scanning in React Native apps using Expo.
- Install eSIM profiles using activation codes
- Scan QR codes for eSIM activation
- Seamless integration with Expo and React Native
npx expo install expo-esimMake sure you are using the custom development client:
npx expo run:androidimport ExpoEsimModule from 'expo-esim';
const installEsim = async (activationCode: string) => {
try {
const result = await ExpoEsimModule.install(activationCode);
console.log('Success:', result);
} catch (error) {
console.error('Error:', error);
}
};import ExpoEsimModule from 'expo-esim';
const scanEsimQrCode = async () => {
try {
const result = await ExpoEsimModule.scanQrCode();
console.log('Success:', result);
} catch (error) {
console.error('Error:', error);
}
};- Description: Installs an eSIM profile using the provided activation code.
- Parameters:
activationCode(string): The eSIM activation code.
- Returns: Promise resolving with a success message or rejecting with an error.
- Description: Opens the QR code scanner to activate an eSIM.
- Returns: Promise resolving with a success message or rejecting with an error.
Ensure the app targets Android 11 (API level 30) or higher for eSIM functionality.
You can find a complete example implementation in the repository under the /example folder.
To run the example:
cd example
npx expo run:androidFound a bug or want to request a feature? Open an issue here.
Ahmed Mones
🔗 GitHub - Al-Taie
This project is licensed under the MIT License.
If you find this module helpful, please consider starring the repository to support the project!