{"id":32477028,"url":"https://github.com/cap-go/capacitor-sim","last_synced_at":"2026-06-17T13:01:26.143Z","repository":{"id":318712256,"uuid":"1072614755","full_name":"Cap-go/capacitor-sim","owner":"Cap-go","description":"Capacitor plugin to get information from device's sim cards","archived":false,"fork":false,"pushed_at":"2026-06-15T22:49:51.000Z","size":1026,"stargazers_count":9,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T23:24:08.813Z","etag":null,"topics":["capacitor","capacitor-plugin","plugin"],"latest_commit_sha":null,"homepage":"https://capgo.app/docs/plugins/sim/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2025-10-09T01:18:49.000Z","updated_at":"2026-06-15T22:41:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"2204dd3e-13f3-4de0-9143-1ad48134c460","html_url":"https://github.com/Cap-go/capacitor-sim","commit_stats":null,"previous_names":["cap-go/capacitor-sim"],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capacitor-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34449283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitor","capacitor-plugin","plugin"],"created_at":"2025-10-26T22:49:18.776Z","updated_at":"2026-06-17T13:01:26.113Z","avatar_url":"https://github.com/Cap-go.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":[],"sub_categories":[],"readme":"# @capgo/capacitor-sim\n\u003ca href=\"https://capgo.app/\"\u003e\u003cimg src=\"https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-sim\" alt=\"Capgo - Instant updates for Capacitor\" /\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin_sim\"\u003e ➡️ Get Instant updates for your App with Capgo\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin_sim\"\u003e Missing a feature? We’ll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\nCapacitor plugin to get information from device's sim cards\n\n## Documentation\n\nThe most complete doc is available here: https://capgo.app/docs/plugins/sim/\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained |\n| -------------- | ----------------------- | ---------- |\n| v8.\\*.\\*       | v8.\\*.\\*                | ✅          |\n| v7.\\*.\\*       | v7.\\*.\\*                | On demand   |\n| v6.\\*.\\*       | v6.\\*.\\*                | ❌          |\n| v5.\\*.\\*       | v5.\\*.\\*                | ❌          |\n\n\u003e **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.\n\n## Install\n\nYou can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:\n\n```bash\nnpx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```text\nUse the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-sim` plugin in my project.\n```\n\nIf you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capgo/capacitor-sim\nnpx cap sync\n```\n\n## Usage\n\n```ts\nimport { Sim } from '@capgo/capacitor-sim';\n\nconst loadSimCards = async () =\u003e {\n  const { simCards } = await Sim.getSimCards();\n\n  return simCards;\n};\n```\n\nThe returned `simCards` array contains carrier information for each detected SIM. On Android the list also exposes the `subscriptionId` and `simSlotIndex` values so you can correlate entries across platform APIs.\n\n### iOS 16.4+ limitations\n\nStarting with iOS 16.4 Apple restricts access to several carrier fields returned by CoreTelephony. On devices running iOS 16.4 or newer the plugin may return placeholder values such as `65535`, `--`, or empty strings for `carrierName`, `isoCountryCode`, `mobileCountryCode`, and `mobileNetworkCode`. This behaviour is handled at the OS level and is tracked upstream in [jonz94/capacitor-sim#8](https://github.com/jonz94/capacitor-sim/issues/8); there is currently no known workaround besides relying on Android data or older iOS versions.\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`getSimCards()`](#getsimcards)\n* [`checkPermissions()`](#checkpermissions)\n* [`requestPermissions()`](#requestpermissions)\n* [`getPluginVersion()`](#getpluginversion)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\nCapacitor SIM Plugin for retrieving information from device SIM cards.\n\nThis plugin provides access to SIM card information such as carrier name,\ncountry code, mobile network codes, and more. Supports dual-SIM devices.\n\n### getSimCards()\n\n```typescript\ngetSimCards() =\u003e Promise\u003cGetSimCardsResult\u003e\n```\n\nGet information from the device's SIM cards.\n\nRetrieves details about all SIM cards installed in the device.\nOn dual-SIM devices, returns information for both SIM cards.\nRequires READ_PHONE_STATE permission on Android.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getsimcardsresult\"\u003eGetSimCardsResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### checkPermissions()\n\n```typescript\ncheckPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nCheck permission to access SIM card information.\n\nChecks if the app has permission to read SIM card data.\nOn Android, checks READ_PHONE_STATE permission.\nOn iOS, the status is always granted.\nOn Web, the status is always denied.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### requestPermissions()\n\n```typescript\nrequestPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nRequest permission to access SIM card information.\n\nPrompts the user to grant permission to read SIM card data.\nOn Android, requests READ_PHONE_STATE permission.\nOn iOS, the status is always granted without prompting.\nOn Web, the status remains denied.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003c{ version: string; }\u003e\n```\n\nGet the native Capacitor plugin version.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ version: string; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetSimCardsResult\n\nResult returned by {@link SimPlugin.getSimCards}.\n\n| Prop           | Type                   |\n| -------------- | ---------------------- |\n| **`simCards`** | \u003ccode\u003eSimCard[]\u003c/code\u003e |\n\n\n#### SimCard\n\nA SIM card description.\n\n| Prop                    | Type                 | Description                                                                                                                                                                                 | Since |\n| ----------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`number`**            | \u003ccode\u003estring\u003c/code\u003e  | Android only: Phone number for this SIM slot, when available.                                                                                                                               | 1.0.0 |\n| **`subscriptionId`**    | \u003ccode\u003estring\u003c/code\u003e  | Android only: Unique subscription identifier.                                                                                                                                               | 1.1.0 |\n| **`simSlotIndex`**      | \u003ccode\u003enumber\u003c/code\u003e  | Android only: Physical SIM slot index for this subscription.                                                                                                                                | 1.1.0 |\n| **`allowsVOIP`**        | \u003ccode\u003eboolean\u003c/code\u003e | iOS only: Indicates whether the carrier supports VoIP.                                                                                                                                      | 1.0.0 |\n| **`carrierName`**       | \u003ccode\u003estring\u003c/code\u003e  | Display name of the cellular service provider. On iOS 16.4+ the system may return placeholder values such as `--`. See https://github.com/jonz94/capacitor-sim/issues/8 for details.        | 1.0.0 |\n| **`isoCountryCode`**    | \u003ccode\u003estring\u003c/code\u003e  | ISO 3166-1 alpha-2 country code of the service provider. On iOS 16.4+ the system may return an empty string or `--`. See https://github.com/jonz94/capacitor-sim/issues/8 for details.      | 1.0.0 |\n| **`mobileCountryCode`** | \u003ccode\u003estring\u003c/code\u003e  | Mobile Country Code (MCC) of the service provider. On iOS 16.4+ the system may return placeholder values such as `65535`. See https://github.com/jonz94/capacitor-sim/issues/8 for details. | 1.0.0 |\n| **`mobileNetworkCode`** | \u003ccode\u003estring\u003c/code\u003e  | Mobile Network Code (MNC) of the service provider. On iOS 16.4+ the system may return placeholder values such as `65535`. See https://github.com/jonz94/capacitor-sim/issues/8 for details. | 1.0.0 |\n\n\n#### PermissionStatus\n\nResult of a permission check or request.\n\n| Prop              | Type                                                        |\n| ----------------- | ----------------------------------------------------------- |\n| **`readSimCard`** | \u003ccode\u003e\u003ca href=\"#permissionstate\"\u003ePermissionState\u003c/a\u003e\u003c/code\u003e |\n\n\n### Type Aliases\n\n\n#### PermissionState\n\n\u003ccode\u003e'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-go%2Fcapacitor-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-sim/lists"}