Skip to content

feat: Integrate @maniac-tech/react-native-expo-read-sms at 9.1.2 on Expo SDK 54#25

Open
maniac-tech wants to merge 4 commits intomasterfrom
sdk-54
Open

feat: Integrate @maniac-tech/react-native-expo-read-sms at 9.1.2 on Expo SDK 54#25
maniac-tech wants to merge 4 commits intomasterfrom
sdk-54

Conversation

@maniac-tech
Copy link
Copy Markdown
Owner

Summary

Verification branch for react-native-expo-read-sms PR #99 — confirms the library at 9.1.2 builds and runs correctly on Expo SDK 54 / React Native 0.81.


Changes

package.json

  • Upgraded @maniac-tech/react-native-expo-read-sms: 8.0.2-alpha^9.1.2
  • Upgraded expo: ^51.0.0~54.0.0
  • Upgraded react-native: 0.74.30.81.5
  • Upgraded react: 18.2.019.1.0 (RN 0.81 requires ^19.1.0)
  • Added babel-preset-expo: ~54.0.10 — must now be declared explicitly (no longer bundled transitively from SDK 54)
  • Added expo-asset: ~12.0.12 — explicit dep required for autolinking to register the ExpoAsset native module
  • Upgraded expo-splash-screen: ~0.27.5~31.0.13
  • Upgraded expo-status-bar: ~1.12.1~3.0.9
  • Upgraded expo-build-properties: ~0.12.3~1.0.10
  • Removed: expo-dev-client — not required for library verification; app builds and runs fine without the dev menu overlay
  • Removed: react-native-paper, react-native-web, react-dom, expo-updates
  • Renamed package: exporeadsms-testexpo-read-sms-test-app

app.json

  • Added explicit sdkVersion: "54.0.0"
  • Fixed android.permissions — now correctly declares RECEIVE_SMS and READ_SMS (was empty [])
  • compileSdkVersion / targetSdkVersion: 34 → 35
  • minSdkVersion: 23 → 24 (RN 0.81 dropped Android 6 / API 23 support)
  • Added expo-asset config plugin entry
  • Removed OTA updates config (expo-updates plugin, runtimeVersion, extra.eas)
  • Removed iOS and web targets (Android-only test app)

App.js

  • Full rewrite: replaced react-native-paper UI with a minimal plain React Native UI
  • Directly calls all four library APIs and logs results on-screen:
    • checkIfHasSMSPermission() — displays both permission flags
    • requestReadSMSPermission() — triggers system dialog, then re-checks status
    • startReadSMS(callback) — starts listener; logs received SMS body
    • stopReadSMS() — stops listener; confirms via log
  • Removed useApp hook dependency (previously coupled to old UI)

Build Issues Encountered & Resolved

Error Root cause Fix
ReactNativeApplicationEntryPoint / loadReactNative unresolved android/ was prebuilt with RN 0.81 template but package.json had RN 0.79 Upgrade react-native: 0.79.60.81.5
react@"^19.1.0" peer dep conflict RN 0.81 requires React 19.1 (not 19.0) react: 19.0.019.1.0
Cannot find module 'babel-preset-expo' No longer bundled transitively from SDK 54 Add babel-preset-expo: ~54.0.10 as explicit dep

Testing

Property Value
Expo SDK ~54.0.0
React Native 0.81.5
React 19.1.0
Library version ^9.1.2
New Architecture Off (default for SDK 54 existing projects)
Android compileSdk / targetSdk 35
Android minSdk 24

Verification Checklist

  • App builds without errors (npx expo prebuild + npx expo run:android succeed)
  • App launches on device/emulator
  • checkIfHasSMSPermission() — returns correct { hasReadSmsPermission, hasReceiveSmsPermission } object
  • requestReadSMSPermission() — system dialog appears; returns true when granted
  • startReadSMS(callback) — starts without error; callback fires with status === "success"
  • Incoming SMS received — callback delivers correct [phoneNumber, messageBody] values
  • stopReadSMS() — stops listener; no further callbacks after stopping
  • No NativeEventEmitter warnings in console

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant