1.0.6 ⢠Published 5 months ago
expo-esim v1.0.6
š± expo-esim
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.
š Features
- Install eSIM profiles using activation codes
- Scan QR codes for eSIM activation
- Seamless integration with Expo and React Native
š¦ Installation
npx expo install expo-esim
Make sure you are using the custom development client:
npx expo run:android
āļø Usage
1ļøā£ Install eSIM
import 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);
}
};
2ļøā£ Scan eSIM QR Code
import ExpoEsimModule from 'expo-esim';
const scanEsimQrCode = async () => {
try {
const result = await ExpoEsimModule.scanQrCode();
console.log('Success:', result);
} catch (error) {
console.error('Error:', error);
}
};
š API Reference
install(activationCode: string): Promise<string>
- 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.
scanQrCode(): Promise<string>
- Description: Opens the QR code scanner to activate an eSIM.
- Returns: Promise resolving with a success message or rejecting with an error.
š± Android Requirments
Ensure the app targets Android 11 (API level 30) or higher for eSIM functionality.
š” Example Project
You can find a complete example implementation in the repository under the /example
folder.
To run the example:
cd example
npx expo run:android
š Reporting Issues
Found a bug or want to request a feature? Open an issue here.
šØāš» Author
Ahmed Mones
š GitHub - Al-Taie
š License
This project is licensed under the MIT License.
š Support
If you find this module helpful, please consider starring the repository to support the project!