搜尋套件、儲存庫與 APP 分類

套件詳情v0.0.4

esim

Flutter 外掛程式,用於檢查 eSIM 相容性。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
45
喜歡數
38
Pub 分數
115

安裝套件

flutter pub add esim

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

esim 套件是一個 Flutter 插件,專門用於檢查 Android 與 iOS 裝置上的 eSIM 相容性。它為開發者提供了一種簡單的方式,以判斷裝置是否支援 eSIM 功能,進而讓應用程式能根據硬體功能調整功能。該套件相容多個平台,包括 Web、macOS、Windows 與 Linux,雖然其主要用途是在行動作業系統上。它透過平台通道使用原生 API 來提供精確的裝置資訊。此工具非常適合依賴蜂巢式連線或提供 eSIM 配置服務的應用程式。

適用情境

  • 在執行時檢查裝置 eSIM 支援
  • 在應用中啟用 eSIM 特定功能
  • 為支援eSIM的裝置提供使用者指引
  • 在移動應用中整合eSIM設定流程
  • 支援運營商設定工具

主要特色

  • 跨平台相容性
  • eSIM 狀態檢查的簡單 API
  • 原生支援 Android 與 iOS
  • 傳回裝置eSIM功能狀態
  • 適用於 Web、macOS、Windows 和 Linux

適合對象

  • 行動應用程式開發者建構連接功能
  • 需要eSIM設定的App
  • 針對多平台部署的開發者
  • 用於運營商或裝置相容性評估的工具
  • 專注於數位SIM管理的應用

使用建議

  • 非行動平台功能受限
  • eSIM 的可用性取決於設備製造商
  • 不支援執行時期eSIM啟用
  • 平台特定的行為可能有所差異
  • Android 和 iOS 需要正確的權限

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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

所屬分類

依賴

依賴清單 1 項

  • plugin_platform_interface^2.0.2

原始碼儲存庫

使用此套件的專案

暫無相關資料。