React Native plugin to manage Sim card(s) & eSim

Overview

react-native-sim-cards-manager

A new library that merge multiple sim cards libraries into a single one:

Bridges have been adapted, so you will have to adapt your code if you come from one of those libraries.

Bugs fixed and some improvements have been made.

Installation

npm install react-native-sim-cards-manager

Permissions

Android

Minimum API Level is 22

TelephonyManager require Android permission READ_PHONE_STATE:

Add in your Android Manifest:

<uses-permission
          android:name="android.permission.READ_PHONE_STATE" />

iOS

This API won't work without eSIM entitlement. You can read more about it here

Minimum API Level is 12 for eSIM methods

Note: At the moment (iOS 14.2) there might a bug in iOS SDK which returns uknown result before eSIM setup completion. More about it here

Usage

Get sim cards

The list can be empty (no simcards detected) or one/many element(s) Two methods are availabe :

Method getSimCards

This handle the permission request and takes an optionnal rationale Parameter

import { SimManager } from 'react-native-sim-cards-manager';

SimCardsManagerModule.getSimCards({
  title: 'App Permission',
  message: 'Custom message',
  buttonNeutral: 'Not now',
  buttonNegative: 'Not OK',
  buttonPositive: 'OK',
})
  .then((array: Array<any>) => {
    //
  })
  .catch((error) => {
    //
  });

Method getSimCardsNative

This is the method used internally by getSimCards. It does not handle the permission request and leaves the user of this lib.

import { SimManager } from 'react-native-sim-cards-manager';

SimCardsManagerModule.getSimCardsNative()
  .then((array: Array<any>) => {
    //
  })
  .catch((error) => {
    //
  });

Available set of data per platform:

Platform iOS Android
carrierName
displayName
isoCountryCode
mobileCountryCode
mobileNetworkCode
isNetworkRoaming
isDataRoaming
simSlotIndex
phoneNumber
simSerialNumber
subscriptionId
allowsVOIP

Esim is supported

Return true/false is the device support eSim feature

import { SimManager } from 'react-native-sim-cards-manager';

SimCardsManagerModule.isEsimSupported()
  .then((isSupported: boolean) => {
    //
  })
  .catch((error) => {
    //
  });

Setup eSim with an activation code

Entry parameters for the bridge:

Entry parameters Mandatory Description
address N/A The address of the carrier network’s eSIM server
confirmationCode N/A The provisioning request’s confirmation code, provided by the network operator when initiating an eSIM download
iccid N/A The provisioning request’s eUICC identifier
address N/A The provisioning request’s Integrated Circuit Card Identifier
matchingId N/A The provisioning request’s matching identifier
oid N/A The provisioning request’s Object Identifier

Error code that can be returned by the bridge:

Error code Description
0 Feature not available for that OS / device
1 The device doesn't support a cellular plan
2 The OS failed to add the new plan
3 (iOS) The OS has returned an unknow error
3 (Android) The OS has returned an error or something goes wrong with the Intent/Activity
import { SimManager } from 'react-native-sim-cards-manager';

SimCardsManagerModule.setupEsim({
  confirmationCode,
  address: '',
})
  .then((isPlanAdded: boolean) => {
    //
  })
  .catch((error) => {
    //
  });

Changelog

1.0.3

  • Fix bug with EMBEDDED_SUBSCRIPTION_RESULT_ERROR #12

1.0.2

  • Remove 'deviceID' on Android because it require high privilege
  • Adding permission management on Android (READ_PHONE_STATE)

1.0.1

  • Android bug fixes

1.0.0

  • First stable release

0.9.9

  • iOS implementation
  • Android implementation
  • RN implementation
  • Documentation & sample project

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Comments
  • EMBEDDED_SUBSCRIPTION_RESULT_ERROR - Can't add an Esim subscription

    EMBEDDED_SUBSCRIPTION_RESULT_ERROR - Can't add an Esim subscription

    When I have pass valid "confirmationCode" and "address" then got error "EMBEDDED_SUBSCRIPTION_RESULT_ERROR - Can't add an Esim subscription"

    From updated code version"1.0.2"

    opened by vasudevjogani 7
  • getSimCardsError

    getSimCardsError

    I ran demo source and when I GET SIM CARDS it return getSimCardsError with message:

    Something goes wrong to getch simcards:getDeviceId: The user ****** does not meet the requirements to access device identifiers

    Pls help me

    opened by bachbonglong 5
  • in Android 12 not working

    in Android 12 not working

    Getting below error in OS 12 : "EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR - Can't setup eSim du to Activity error Invalid result intent"

    opened by vasudevjogani 1
  • [Snyk] Upgrade react-native from 0.69.0 to 0.70.6

    [Snyk] Upgrade react-native from 0.69.0 to 0.70.6

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to upgrade react-native from 0.69.0 to 0.70.6.

    :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 19 versions ahead of your current version.
    • The recommended version was released a month ago, on 2022-11-15.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by odemolliens 0
  • build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /example

    build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /example

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • [Snyk] Security upgrade react-native from 0.68.2 to 0.69.0

    [Snyk] Security upgrade react-native from 0.68.2 to 0.69.0

    Snyk has created this PR to fix one or more vulnerable packages in the `yarn` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • example/package.json
      • example/yarn.lock

    Vulnerabilities that will be fixed

    With an upgrade:

    Severity | Priority Score (*) | Issue | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:------------------------- high severity | 619/1000
    Why? Has a fix available, CVSS 8.1 | Remote Code Execution (RCE)
    SNYK-JS-SHELLQUOTE-1766506 | No | No Known Exploit

    (*) Note that the real score may have changed since the PR was raised.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic


    Learn how to fix vulnerabilities with free interactive lessons:

    🦉 Remote Code Execution (RCE)

    opened by snyk-bot 0
  • [Snyk] Upgrade react-native from 0.68.1 to 0.68.2

    [Snyk] Upgrade react-native from 0.68.1 to 0.68.2

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to upgrade react-native from 0.68.1 to 0.68.2.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released a month ago, on 2022-05-09.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by odemolliens 0
  • build(deps): bump simple-plist from 1.3.0 to 1.3.1

    build(deps): bump simple-plist from 1.3.0 to 1.3.1

    Bumps simple-plist from 1.3.0 to 1.3.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • [Snyk] Upgrade react-native from 0.68.0 to 0.68.1

    [Snyk] Upgrade react-native from 0.68.0 to 0.68.1

    Snyk has created this PR to upgrade react-native from 0.68.0 to 0.68.1.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 22 days ago, on 2022-04-13.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
  • [Snyk] Security upgrade react-native from 0.67.3 to 0.68.0

    [Snyk] Security upgrade react-native from 0.67.3 to 0.68.0

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to fix one or more vulnerable packages in the `yarn` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • example/package.json
      • example/yarn.lock

    Vulnerabilities that will be fixed

    With an upgrade:

    Severity | Priority Score (*) | Issue | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:------------------------- high severity | 696/1000
    Why? Proof of Concept exploit, Has a fix available, CVSS 7.5 | Regular Expression Denial of Service (ReDoS)
    SNYK-JS-ANSIREGEX-1583908 | No | Proof of Concept medium severity | 519/1000
    Why? Has a fix available, CVSS 6.1 | Denial of Service (DoS)
    SNYK-JS-HERMESENGINE-2342071 | No | No Known Exploit high severity | 619/1000
    Why? Has a fix available, CVSS 8.1 | Remote Code Execution (RCE)
    SNYK-JS-SHELLQUOTE-1766506 | No | No Known Exploit medium severity | 586/1000
    Why? Proof of Concept exploit, Has a fix available, CVSS 5.3 | Regular Expression Denial of Service (ReDoS)
    SNYK-JS-WS-1296835 | No | Proof of Concept

    (*) Note that the real score may have changed since the PR was raised.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic


    Learn how to fix vulnerabilities with free interactive lessons:

    🦉 Remote Code Execution (RCE)

    opened by odemolliens 0
Releases(1.0.10)
Owner
@odemolliens
@odemolliens
Get device location by telephony (SIM card) or settings without using GPS tracker.

react-native-device-country Get device location by telephony (SIM card) or settings without using GPS tracker Installation yarn add react-native-devic

dev.family 46 Nov 29, 2022
Sceneform React Native AR Component using ARCore and Google Filament as 3D engine. This the Sceneform Maintained Component for React Native

Discord Server Join us on Discord if you need a hand or just want to talk about Sceneform and AR. Features Remote and local assets Augmented Faces Clo

SceneView Open Community 42 Dec 17, 2022
With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any other file server

React Native In-App update With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any o

Nepein Andrey 7 Dec 21, 2022
React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

null 7 May 2, 2022
An awesome native wheel picker component for React Native.

⛏️ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

null 28 Dec 4, 2022
Cardsystem - Digital card sign-in/sign-out system for the Indiana Academy

cardsystem Digital card sign-in/sign-out system for the Indiana Academy Requirements: Create system for inputing destination, companion, and estimated

null 1 Feb 23, 2022
A simple Flash Card application to assist in learning and remembering something.

a-flash-deck A simple Flash Card application to assist in learning and remembering something. This project is intended for demo app for a-navigator an

null 16 Dec 30, 2022
A multi-ride amusement park ticket application on NFC memory card

A multi-ride amusement park ticket application on NFC memory card. The security features cover mitigating: Man in the Middle attack, Rollback attack, tearing protection, Write Protection.

Jayshree Rathi 1 Nov 28, 2022
An unofficial rules engine for the world's greatest card game.

Forge Official repo. Dev instructions here: Getting Started (Somewhat outdated) Discord channel here Requirements / Tools you favourite Java IDE (Inte

Forge 150 Dec 30, 2022
A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

LazyRabbit 23 Sep 1, 2022
Lightweight React Native UI Components inspired on Vant

vant-react-native Install yarn add vant-react-native Or npm install vant-react-native Usage import React, { Component } from 'react'; import { View, T

洛竹 51 Sep 29, 2022
Admob for React Native with powerful hooks and components

React Native Admob ⚠️ Please note, this package is under active development, which means it may be not stable to apply on production. Please use this

null 128 Jan 6, 2023
React Native wrapper around Indy SDK Java and Objective-C wrappers.

React Native Indy SDK React Native Indy SDK wrapper. Installation with npm: $ npm install indy-sdk-react-native --save with Yarn: $ yarn add indy-sdk-

Hyperledger 21 Dec 5, 2022
Ship React Native .jsbundles compressed by Brotli algorithm.

Ship compressed JS bundles Warning: not yet available for Android. Sometimes you need a very small .app, for example if you are building an App Clip.

Ivan Moskalev 37 Nov 15, 2022
Prevent Screenshots in your React Native app when needed. 🦄

React Native Prevent Screenshots Prevent Screenshots in your React Native app when needed. ?? Installation First, you need to install the package usin

Ahmed Mahmoud 64 Oct 19, 2022
Using turborepo & react-native

Turborepo starter with NPM This is an official starter turborepo. What's inside? This turborepo uses NPM as a package manager. It includes the followi

Renan Machado 5 Feb 16, 2022
This is a Food Delivery Mobile Application. Build Using React Native

Ax Food Delivery Service This is a Food Delivery Mobile Application build using ?????????? ???????????? ?? Installation Clone this repository git clon

Mindula Dilthushan Manamperi 13 Jul 14, 2022
Project developed for MB Talk - App Center integration on React Native

App Center Setup Download APK Click here Requirements React Native CLI Yarn Sign Up on App Center and create a new App. How to use this repo Clone thi

André Angeloni 2 Oct 31, 2022
Lottie wrapper for React Native.

Lottie for React Native, iOS, and Android Lottie component for React Native (iOS and Android) Lottie is a mobile library for Android and iOS that pars

Lottie - React Native 15.6k Jan 7, 2023