Skip to content

[cellular] remove deprecated constants, return null as replacement for deprecated native iOS methods#43035

Merged
vonovak merged 1 commit intomainfrom
vonovak__cellular_return_null_as_replacement_for_deprecated_ios_methods
Feb 10, 2026
Merged

[cellular] remove deprecated constants, return null as replacement for deprecated native iOS methods#43035
vonovak merged 1 commit intomainfrom
vonovak__cellular_return_null_as_replacement_for_deprecated_ios_methods

Conversation

@vonovak
Copy link
Copy Markdown
Contributor

@vonovak vonovak commented Feb 10, 2026

Why

We're exposing information from CTCarrier which is deprecated with no replacement, as it exposes information that's (I suppose) privacy-sensitive.

The apis currently return dummy values such as -- instead of carrier name. Our docs don't reflect that.

I also removed several constants that were deprecated long ago.

closes #23256

How

  • remove the old apis on native side and return null, same as on web

Test Plan

  • NCL

Checklist

@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Feb 10, 2026

The Pull Request introduced fingerprint changes against the base commit: 205ab6d

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../node_modules/@react-native-community/netinfo",
      "reasons": [
        "rncoreAutolinkingAndroid",
        "rncoreAutolinkingIos"
      ],
      "hash": "21bc10eeb458ac3a912d18639399cd09b8e61e92"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../node_modules/@react-native-community/netinfo",
      "reasons": [
        "rncoreAutolinkingAndroid",
        "rncoreAutolinkingIos"
      ],
      "hash": "7131e2ecb37cc4844850df0ba562b6d8f2f43886"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-cellular/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "8319b298f39fe576e85e9757068428817ffdb889"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-cellular/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "5324395d5dce43d3b8956069f68a716c42abf4ee"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-cellular/ios",
      "reasons": [
        "expoAutolinkingIos"
      ],
      "hash": "45027214786e8fc2f07f26753bdebc888979f4ac"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-cellular/ios",
      "reasons": [
        "expoAutolinkingIos"
      ],
      "hash": "d38066c759ea4276f8a4eceae4a7a03d43c8ae2a"
    }
  }
]

Generated by PR labeler 🤖

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Feb 10, 2026
@vonovak vonovak force-pushed the vonovak__cellular_return_null_as_replacement_for_deprecated_ios_methods branch from 56b3faf to b3c8160 Compare February 10, 2026 15:26
Copy link
Copy Markdown
Contributor Author

vonovak commented Feb 10, 2026

@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Feb 10, 2026
@vonovak vonovak marked this pull request as ready for review February 10, 2026 15:38
@github-actions
Copy link
Copy Markdown
Contributor

Subscribed to pull request

File Patterns Mentions
docs/** @amandeepmittal
packages/expo-cellular/** @ide, @lukmccall

Generated by CodeMention

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes deprecated carrier-related APIs (especially those relying on deprecated iOS CoreTelephony carrier info) and standardizes iOS behavior to return null (matching web) rather than dummy values.

Changes:

  • Removed deprecated synchronous constants (JS/TS and native Android/iOS constants).
  • Disabled iOS implementations for carrier-related async methods and return null on iOS from the JS layer.
  • Updated generated build artifacts and docs JSON to reflect the new API surface/behavior.

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/expo-cellular/src/Cellular.ts Removes deprecated exports; updates JSDoc and returns null on iOS for carrier-related async APIs.
packages/expo-cellular/ios/CellularModule.swift Removes deprecated constants and carrier-related async functions from the iOS native module.
packages/expo-cellular/android/src/main/java/expo/modules/cellular/CellularModule.kt Removes deprecated constants from the Android native module.
packages/expo-cellular/build/Cellular.js Regenerated JS build output reflecting source changes.
packages/expo-cellular/build/Cellular.d.ts Regenerated type declarations reflecting removed exports and updated docs.
packages/expo-cellular/build/Cellular.d.ts.map Regenerated sourcemap for type declarations.
packages/expo-cellular/CHANGELOG.md Adds a breaking-change entry for the behavior change.
docs/public/static/data/v55.0.0/expo-cellular.json Updates versioned docs JSON to remove deprecated constants and reflect platform behavior.
docs/public/static/data/unversioned/expo-cellular.json Updates unversioned docs JSON to remove deprecated constants and reflect platform behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vonovak vonovak force-pushed the vonovak__cellular_return_null_as_replacement_for_deprecated_ios_methods branch from b3c8160 to 3beb902 Compare February 10, 2026 16:47
@vonovak vonovak changed the title [cellular] return null as replacement for deprecated iOS methods [cellular] remove deprecated constants, return null as replacement for deprecated native iOS methods Feb 10, 2026
@vonovak vonovak merged commit 9e2596e into main Feb 10, 2026
14 of 16 checks passed
@vonovak vonovak deleted the vonovak__cellular_return_null_as_replacement_for_deprecated_ios_methods branch February 10, 2026 17:54
@alanjhughes alanjhughes added the published Changes from the PR have been published to npm label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cellular.getIsoCountryCodeAsync() returns "--"

6 participants