πΆ esim_manager
A Flutter plugin to check eSIM support and install eSIM profiles on Android and iOS using official, system-supported provisioning flows.
π Overview
esim_manager allows you to:
- Detect whether a device supports eSIM
- Install eSIM profiles using:
- Activation Codes on Android
- Apple LPA provisioning flow on iOS
- Listen to install result events for advanced integrations
Designed for travel eSIM apps, telecom providers, enterprise device onboarding, and carrier provisioning flows.
π Features
- π Check if the current device supports eSIM
- π€ Android eSIM installation via
EuiccManager - π iOS eSIM installation using Appleβs official LPA UI
- π Stream-based install result callbacks
- π§© Clean, platform-agnostic Dart API
π± Platform Support
| Platform | eSIM Check | eSIM Install |
|---|---|---|
| Android | β | β |
| iOS | β | β (LPA URL) |
π¦ Installation
Add the dependency to your pubspec.yaml:
dependencies:
esim_manager: ^0.0.3
Then run:
flutter pub get
π₯ Import
import 'package:esim_manager/esim_manager.dart';
π Usage
π Check eSIM Support
final esimManager = EsimManager();
final isSupported = await esimManager.isEsimSupported();
print('eSIM supported: $isSupported');
π Install eSIM on iOS (Recommended)
On iOS, eSIM installation must use Appleβs system UI. Provide a valid LPA string:
await EsimManager().installIosViaLpa(
'LPA:1$YOUR_SMDP_ADDRESS$YOUR_ACTIVATION_CODE',
);
This will open the native iOS eSIM installation screen.
π€ Install eSIM on Android
final esimManager = EsimManager();
final isSupported = await esimManager.isEsimSupported();
if (!isSupported) {
print('Device does not support eSIM');
return;
}
final result = await esimManager.installFromActivationCode(
'YOUR_ACTIVATION_CODE',
);
print('Status: ${result.status}');
print('Message: ${result.message}');
π Listen for Install Result Events
You can listen to installation updates using a stream:
EsimManager().installEvents.listen((event) {
print('Request ID: ${event.requestId}');
print('Status: ${event.result.status}');
print('Message: ${event.result.message}');
});
Useful for:
- Analytics
- Error tracking
- Multi-step provisioning flows
β οΈ Notes & Limitations
- iOS does not allow silent eSIM installation
- Android installation may require carrier or system privileges
- Always test on real devices with eSIM support
- Emulator / Simulator does not support eSIM
π§ͺ Testing
| Platform | Emulator | Real Device |
|---|---|---|
| Android | β | β |
| iOS | β | β |
π License
MIT License
Feel free to use, modify, and contribute.
π€ Contributions
Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.
π¬ Support
If you encounter issues or have feature requests, please open an issue on GitHub.