1.0.6 • Published 5 months ago

expo-esim v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

šŸ“± 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!

⭐ Star the repo

1.0.6

5 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago