Search packages, repositories and app categories

Package detailsv0.0.4

esim

Flutter plugin to check eSIM compatibility.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
45
Likes
38
Pub points
115

Install package

flutter pub add esim

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The esim package is a Flutter plugin designed to check eSIM compatibility on Android and iOS devices. It provides developers with a straightforward way to determine whether a device supports eSIM functionality, enabling apps to adapt features based on hardware capabilities. The plugin is compatible across multiple platforms including Web, macOS, Windows, and Linux, though its primary use is on mobile operating systems. It leverages native APIs through platform channels to deliver accurate device information. This tool is ideal for applications that rely on cellular connectivity or offer eSIM provisioning services.

Use cases

  • Checking device eSIM support at runtime
  • Enabling eSIM-specific features in apps
  • Providing user guidance for eSIM-compatible devices
  • Integrating eSIM setup flows in mobile apps
  • Supporting carrier configuration tools

Key features

  • Cross-platform compatibility
  • Simple API for eSIM status checks
  • Supports Android and iOS natively
  • Returns device eSIM capability status
  • Works on Web, macOS, Windows, and Linux

Suitable for

  • Mobile app developers building connectivity features
  • Apps requiring eSIM provisioning
  • Developers targeting multi-platform deployment
  • Tools for carrier or device compatibility assessment
  • Apps focused on digital SIM management

Considerations

  • Limited functionality on non-mobile platforms
  • eSIM availability depends on device manufacturer
  • No runtime eSIM activation support
  • Platform-specific behavior may vary
  • Requires proper permissions on Android and iOS

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

flutter_esim

This project contains the steps and information needed to check if your iOS device is compatible with eSIM technology. eSIM, or Embedded SIM, is a new type of SIM card that is embedded within the device itself, rather than being a physical card that can be inserted and removed. This allows for more flexibility in activating and switching between different mobile plans.

Compatibility Check:

You can integrate eSIM functionality into your iOS app, please follow these steps:

Step 1:

Request for eSIM entitlement using your developer account.

Step 2:

Apple will approve the entitlement after some time. You can check if Apple has approved the entitlement from your app profile setting

Step 3:

Download the App Dev and Distribution profile (By selecting eSIM entitlement as Step #2).

Step 4:

Update your Info.plist with below keys and value

<key>CarrierDescriptors</key>
<array>
<dict>
<key>GID1</key>
<string>***</string>
<key>GID2</key>
<string>***</string>
<key>MCC</key> //Country Code
<string>***</string>
<key>MNC</key> //Network Code
<string>***</string>
</dict>
</array>

You can find GID1, GID2, MCC, and MNC for eSIM compatibility from the following sources:

Mobile network operators -

You can contact your mobile network operator and ask for the GID1, GID2, MCC, and MNC for your specific eSIM card. Online eSIM providers - Many online eSIM providers, such as Truphone, Twilio, and Unlocator, will provide the GID1, GID2, MCC, and MNC for their eSIM cards on their websites. Device manufacturers - Some device manufacturers, such as Apple and Samsung, will provide the GID1, GID2, MCC, and MNC for their eSIM-compatible devices on their website or in the device's user manual. eSIM databases - There are online databases, such as esimdb.com, that provide information on eSIM cards and their GID1, GID2, MCC, and MNC.

It is important to note that eSIM compatibility can vary depending on the mobile network operator and device, so it is important to check with the specific provider or manufacturer for the most accurate information.

Step 5:

Add eSIM compatibility code to AppDelegate file.

main.dart
class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class _MyAppState extends State<MyApp> {
  int isEsimCompatible = 0;

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> checkEsimCompatibility() async {
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      isEsimCompatible = await Esim.isEsim();
    } on PlatformException {
      debugPrint('Failed to get esim compatibility.');
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('eSIM Compatibility example'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              await checkEsimCompatibility();
              Fluttertoast.showToast(
                  msg: isEsimCompatible == 1
                      ? "This device supports eSIM "
                      : 'This device does not supports eSIM',
                  toastLength: Toast.LENGTH_LONG,
                  gravity: ToastGravity.BOTTOM,
                  timeInSecForIosWeb: 1,
                  backgroundColor: Colors.grey,
                  textColor: Colors.white,
                  fontSize: 16.0);
            },
            child: const Text("Check eSIM compatibility"),
          ),
        ),
      ),
    );
  }
}

Upcoming features

  • eSIM compatibility for Android
  • eSIM installation for iOS and Android

Conclusion

With these steps, you can now check if your iOS device is compatible with eSIM, activate eSIM and switch between eSIM and physical SIM.

Referral link:

https://developer.apple.com/documentation/coretelephony?changes=latest_minor

Categories

Dependencies

Dependency list 1 items

  • plugin_platform_interface^2.0.2

Source repository

Projects using this package

No data available yet.