React Native × Node × Twilio (iOS - Android) — Quick Setup Guide

A concise guide for spinning up the project locally. Perfect for new teammates who just need the basics.

Stack: React Native • Node (Express) • Twilio • Firebase • Socket.IO
Targets: iOS (VoIP) • Android (FCM)
Buy Now

Prerequisites

Download / Clone - Install

Steps

  1. Download the project.
  2. Navigate to the project root folder.
  3. Open it in your editor (VS Code recommended).

Bash

bash# Install deps
npm install
cd ios
pod install

Configure Environment Variables

Run the Stack

iOS

Heads-up: The first iOS build triggers CocoaPods; it may take a few minutes.
  1. Run npm start.
  2. Open ios/nummio.xcworkspace in Xcode.
  3. Select a physical device in the Xcode header and press ▶.

Android

Heads-up: The first build will configure Gradle; it may take a few minutes.
  1. Run npm start in your system terminal (not the Android Studio terminal).
  2. Open the android folder in Android Studio and wait for Gradle to build successfully.
  3. Connect your Android device and enable USB debugging in Developer Options.
  4. Press ▶ in Android Studio.

Folder Cheat-Sheet

  • server.js — Node API (Express)
  • .env — Twilio / Firebase credentials - tokens
  • /certs — contains an Apple .p8 key (Apple Developer → Keys)
  • app.tsx — app entry (starting point)
  • /src/assets/Helper/revenueCat.tsx — in-app purchase config - keys (RevenueCat)
  • /src/assets/Helper/TwilioApis.js — Twilio APIs (call logs, messages, purchase number, etc.)
  • Rest: React Native app files

Common Issues - Fixes

VoIP Certificate Generation (iOS)

1) Generate a Private Key

bashopenssl genrsa -out voip_private.key 2048
# Output: voip_private.key

2) Generate a CSR

bashopenssl req -new -key voip_private.key -out voip_csr.csr
# Output: voip_csr.csr

3) Create VoIP Certificate on Apple Developer Portal

  1. Apple Developer → Certificates → +
  2. Choose VoIP Services Certificate (Services section)
  3. Select your Bundle Identifier
  4. Upload voip_csr.csr → download voip_services.cer

4) Convert .cer to .pem

bashopenssl x509 -in voip_services.cer -inform DER -out voip_cert.pem -outform PEM
# Output: voip_cert.pem

5) Create a .p12 file

bashopenssl pkcs12 -export \
  -inkey voip_private.key \
  -in voip_cert.pem \
  -out voip_cert.p12 \
  -name "VoIP Certificate"
# Output: voip_cert.p12 (set a password)

6) Extract cert.pem - key.pem from .p12

bashopenssl pkcs12 -in voip_cert.p12 -clcerts -nokeys -out cert.pem
openssl pkcs12 -in voip_cert.p12 -nocerts -nodes -out key.pem
Result: cert.pem and key.pem are used by Twilio to connect with your app/server.

Upload Keys - Certs in Twilio Console (Push Credentials)

  1. Twilio Console → API Keys → sidebar CredentialsPush Credentials+.
  2. Name it, select APN Push Credentials.
  3. Open cert.pem and paste into Certificate.
  4. Open key.pem and paste into Private key.
  5. Check Sandbox and save.
You’ll get a Credential SID → use as voipPushCredentialSid on the server.

Android FCM Credentials Setup

  1. Create a Firebase project using your Android package name (e.g., com.yourPackageName.app).
  2. Go to Service Accounts → create a JSON key → download to project root.
  3. Open the JSON and copy its contents.
  4. In Twilio Console → API - KeysCredentials → create new credentials of type FCM credential.
  5. Use the resulting Credential SID as fcmPushCredentialSid on the server.
  6. Open your Notify Service and attach both the APNS credential and the new FCM credential.
You’ll get a SERVICE SID → use as notifyServiceSid on the server.

In-App Products - RevenueCat

Create IAP Products

iOS — App Store Connect

  1. Open appstoreconnect.apple.com/apps → select your app.
  2. Side menu → In-App Purchases+.
  3. Select type: Consumable (tokens) or Non-Consumable/Subscription as needed.
  4. Add Name and Product IDCreate.
  5. On the product page, add storefronts/countries, price, description, and review info.

Android — Play Console

  1. Open play.google.com → select your app.
  2. Monetize with PlayIn-App ProductsCreate product (for tokens).
  3. Enter Product ID, Name, Description, PriceSaveActivate.
  4. For subscriptions: Monetize with PlaySubscriptionsCreate subscription.
  5. Add Product ID - NameCreateAdd base plan (Pre-Paid), set duration - price → SaveActivate.

Configure RevenueCat

iOS — Keys - Providers

1) Generate an In-App Purchase (IAP) Key
  1. App Store Connect → Users and AccessIntegrationsIn-App PurchaseGenerate.
  2. Name the key and download the .p8 file (one-time download). Store it securely.
Note: The IAP .p8 can only be downloaded once.
2) Create an App Store Connect API Key
  1. App Store Connect → Users and AccessIntegrationsApp Store Connect APIGenerate API Key.
  2. Assign role Admin and download the .p8 (one-time download). Store it securely.
Note: The API .p8 can only be downloaded once.
3) Connect App Store to RevenueCat
  1. Go to app.revenuecat.comApps - Providers → select App Store.
  2. Add App Name and Bundle ID (same as in Xcode).
  3. In-App Purchase key configuration: upload the IAP .p8; enter its Key ID and Issuer ID. You can find it in same page.
  4. App Store Connect API configuration: upload the API .p8; enter its Key ID and Issuer ID. You can find it in same page.
  5. Click Save changes.
  6. Copy the Public API Key (iOS) and paste it into revenueCat.tsx/revenueCat.js.

Android — Service Credentials

  1. In RevenueCat → Apps - Providers → select Google Play Store → add App Name - Package Name.
  2. Create a Google Service Account and JSON credentials following RevenueCat’s guide → upload JSON to RevenueCat.
  3. Click Save changes.
  4. Copy the Public API Key (Android) and add it to your revenueCat.tsx/js.

Entitlements - Product Catalog

  1. RevenueCat → Product CatalogEntitlements+ New Entitlement → add Identifier - Description.
  2. Open the entitlement → + New → select your app → Import products → choose products → Import.
  3. Copy the entitlement id (e.g., entl*******) and update it in revenueCat.tsx/js and PlanSelection.js.
  4. Back in Product CatalogProducts → if empty, Import Products → then Attach each product to your entitlement.

Server API Documentation

The Node server (Express) handles calls, messaging, blocking, and lifecycle operations; integrates Twilio, Firebase, and Socket.IO.

Endpoints (Overview)

MethodPathPurpose
POST/voiceInitiate outbound call via Twilio
POST/voice-handlerInbound calls, block checks, VoIP push
POST/twilio-webhookInbound SMS → tokens, FCM push, Socket.IO
POST/blockBlock a phone number (Twilio Sync)
POST/unblockUnblock a phone number
GET/is-blockedCheck if number is blocked
GET/blockedList all blocked numbers
POST/delete-userDelete user - release numbers
POST/release-numbersRelease user’s numbers - expire user

App Functionality - User Flow

Authentication

Phone Number Purchase - Subscription

Multiple Numbers • Billing • Tokens

Subscription Expiry / Cancellation

Calling

Messaging

Blocking / Unblocking Contacts

Access Restrictions

Account Deletion Policy