Skip to main content

Prerequisites

Before setting up the DPM Delivery Mobile app, ensure you have the following tools and software installed on your development machine.

Required Software

Version: LTS (18.x or higher recommended)Node.js is required to run the Expo development server and build tools.
# Check your Node.js version
node --version
Installation:
  • Download from nodejs.org
  • Or use a version manager like nvm:
    nvm install --lts
    nvm use --lts
    
Version: Latest stableBun is the recommended package manager for this project, offering faster installation and runtime performance.
# Check if bun is installed
bun --version
Installation:
# macOS, Linux, and WSL
curl -fsSL https://bun.sh/install | bash

# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
While bun is recommended, you can also use npm or yarn. All examples in this documentation use bun, but the commands are interchangeable.
Version: LatestExpo CLI is used to run and build the application. You don’t need to install it globally—npx expo works out of the box.
# Run Expo commands without global installation
npx expo --version
Optional Global Installation:
npm install -g expo-cli

Platform-Specific Setup

Choose the platform(s) you want to develop for and follow the corresponding setup instructions.

iOS Development Setup

iOS development requires a Mac with Xcode installed.
1

Install Xcode

Download and install Xcode from the Mac App Store.Minimum Version: Xcode 14.0 or higher
# Verify Xcode installation
xcode-select --version
2

Install Command Line Tools

Install Xcode Command Line Tools:
xcode-select --install
Accept the license agreement:
sudo xcodebuild -license accept
3

Install CocoaPods

CocoaPods is required for managing iOS dependencies:
sudo gem install cocoapods
Verify installation:
pod --version
4

Install iOS Dependencies

After cloning the project and installing npm packages, install iOS pods:
npx pod-install
# Or if you're in the ios directory:
cd ios && pod install

iOS Simulator

Xcode includes the iOS Simulator, which allows you to test the app without a physical device.Launch Simulator:
# List available simulators
xcrun simctl list devices

# Launch a specific simulator
open -a Simulator
The app is configured to support both iPhone and iPad (see app.json:12).

Physical iOS Device

To run on a physical iOS device:
  1. Connect your iPhone/iPad via USB
  2. Enable Developer Mode on the device (Settings > Privacy & Security > Developer Mode)
  3. Trust your Mac when prompted
  4. Run bun run ios --device

Verifying Your Setup

After completing the installation, verify your development environment:
node --version
# Should output v18.x.x or higher

Installing the Project

Once your development environment is ready:
1

Clone the Repository

git clone https://github.com/Felix-Asante/dpm-delivery-mobile.git
cd dpm-parcel-delivery-app
2

Install Dependencies

npm install
This will install all dependencies listed in package.json:15.
3

Configure Environment

Create .env.local with required variables:
.env.local
EXPO_PUBLIC_API_BASE_URL=https://your-api.example.com
EXPO_PUBLIC_ENCRYPTION_KEY=your-encryption-key
EXPO_PUBLIC_WEB_CRYPTO_KEY=your-web-crypto-key
These environment variables are validated at runtime in src/utils/env.ts:1. Missing values will cause the app to crash.
4

Start Development Server

bun start
Choose your platform and start developing!

Next Steps

Quickstart Guide

Get the app running in minutes

Project Structure

Understand the codebase organization

Environment Setup

Learn about environment configuration

Configuration

Configure the app for your needs

Troubleshooting

If you see “command not found” errors:
  1. Ensure the tool is installed correctly
  2. Verify PATH environment variables
  3. Restart your terminal
  4. Run source ~/.bashrc (or ~/.zshrc) to reload shell configuration
If Android tools aren’t recognized:
  1. Verify ANDROID_HOME is set correctly
  2. Ensure Android SDK is installed via Android Studio
  3. Check that platform-tools are in your PATH
If CocoaPods installation fails:
# Update CocoaPods
sudo gem install cocoapods

# Clean and reinstall
cd ios
rm -rf Pods Podfile.lock
pod install
If you encounter permission errors:
# Fix npm permissions (Unix)
sudo chown -R $(whoami) ~/.npm

# Or use a version manager like nvm to avoid sudo

Build docs developers (and LLMs) love