Skip to main content

Overview

This guide covers building iOS apps and deploying the DPM Delivery Mobile app to TestFlight and the Apple App Store.

Prerequisites

  • macOS with Xcode installed (latest stable version)
  • Apple Developer Account ($99/year)
  • CocoaPods installed
  • Valid certificates and provisioning profiles

Build Configuration

App Information

  • Bundle Identifier: com.felix-asante.dpm-parcel-delivery-app
  • App Name: dpm-parcel-delivery-app
  • Version: 1.0.0
  • Scheme: dpmparceldeliveryapp

Device Support

  • Orientation: Portrait
  • Tablet Support: Enabled (supports iPad)
  • Interface Style: Automatic (supports dark mode)

Architecture

  • New Architecture: Enabled (newArchEnabled: true)
  • Uses React Native’s new architecture for improved performance

Xcode Setup

Open Project in Xcode

  1. Navigate to the iOS directory:
    cd ios
    
  2. Install CocoaPods dependencies:
    pod install
    
  3. Open the workspace:
    open dpmparceldeliveryapp.xcworkspace
    

Configure Signing

  1. Select your project in Xcode navigator
  2. Select the target under “Targets”
  3. Go to “Signing & Capabilities” tab
  4. Select your development team
  5. Ensure “Automatically manage signing” is enabled
  6. Verify bundle identifier: com.felix-asante.dpm-parcel-delivery-app

Certificate Management

Development Certificates

  1. Create Certificate Signing Request (CSR)
    • Open Keychain Access
    • Go to Keychain Access > Certificate Assistant > Request a Certificate
    • Enter your email and name
    • Save CSR to disk
  2. Generate Development Certificate
    • Go to Apple Developer Portal
    • Click ”+” to create new certificate
    • Select “iOS App Development”
    • Upload your CSR
    • Download and install the certificate

Distribution Certificates

  1. Follow the same CSR process
  2. Select “iOS Distribution (App Store and Ad Hoc)”
  3. Download and install in Keychain Access

Provisioning Profiles

Development Profile:
  1. Go to Profiles in Developer Portal
  2. Create new “iOS App Development” profile
  3. Select your App ID: com.felix-asante.dpm-parcel-delivery-app
  4. Select your development certificate
  5. Select test devices
  6. Download and install
Distribution Profile:
  1. Create new “App Store” profile
  2. Select your App ID and distribution certificate
  3. Download and install

Automatic Signing vs Manual

Automatic (Recommended for Development):
  • Xcode manages certificates and profiles
  • Easier for individual developers
  • Enable in Xcode > Signing & Capabilities
Manual (Required for CI/CD):
  • Full control over certificates
  • Required for automated builds
  • Configure in Xcode or use xcodebuild

Building for iOS

Development Build

Run on simulator:
npm run ios
Or with Expo:
expo run:ios

Build for Device

  1. Connect your iOS device via USB
  2. Select your device in Xcode
  3. Click “Run” (Cmd+R)

Create Archive

  1. In Xcode, select “Any iOS Device” as the destination
  2. Go to Product > Archive
  3. Wait for the archive to complete
  4. Xcode Organizer will open automatically

TestFlight Deployment

Prepare for TestFlight

  1. Create App in App Store Connect
    • Go to App Store Connect
    • Click ”+” to create new app
    • Enter app information:
      • Bundle ID: com.felix-asante.dpm-parcel-delivery-app
      • App Name: DPM Parcel Delivery
      • Primary Language
      • SKU (unique identifier)
  2. Configure App Information
    • App icon (1024x1024, no transparency)
    • Screenshots for all device sizes
    • Description and keywords
    • Support URL and marketing URL
    • Privacy policy URL

Upload to TestFlight

Via Xcode:
  1. Open Xcode Organizer (Window > Organizer)
  2. Select your archive
  3. Click “Distribute App”
  4. Select “App Store Connect”
  5. Choose “Upload”
  6. Select distribution options:
    • Include bitcode: Yes (if required)
    • Upload symbols: Yes
    • Manage version and build number: Automatic
  7. Click “Upload”
Via Transporter App:
  1. Export IPA from Xcode
  2. Open Transporter app
  3. Drag and drop your IPA
  4. Click “Deliver”
Via Command Line (fastlane):
fastlane pilot upload

Add Testers

  1. Go to TestFlight tab in App Store Connect
  2. Wait for build processing (10-15 minutes)
  3. Add internal testers (up to 100)
  4. Add external testers (up to 10,000)
  5. Testers receive email with TestFlight link

External Testing

  1. Create a test group
  2. Add build to the group
  3. Submit for Beta App Review (required for external testers)
  4. Add what to test and contact information
  5. Wait for approval (usually 24-48 hours)

App Store Submission

Prepare for Submission

  1. App Information
    • Complete all metadata fields
    • Add localized descriptions
    • Set pricing and availability
  2. App Privacy
    • Complete privacy questionnaire
    • Describe data collection practices
    • Add privacy policy URL
  3. Screenshots and Previews
    • iPhone 6.7” display (required)
    • iPhone 6.5” display (required)
    • iPad Pro 12.9” (if supporting iPad)
    • Optional: App preview videos
  4. Version Information
    • What’s new in this version
    • Copyright information
    • Support URL

Submit for Review

  1. Select your TestFlight build for release
  2. Complete all sections:
    • App Information
    • Pricing and Availability
    • App Privacy
    • Prepare for Submission
  3. Click “Submit for Review”
  4. Review status changes:
    • Waiting for Review
    • In Review
    • Pending Developer Release / Ready for Sale
    • Rejected (if issues found)

Review Guidelines

Ensure your app complies with App Store Review Guidelines:
  • App completeness and functionality
  • Accurate metadata and screenshots
  • Privacy and data handling
  • Business model clarity
  • Design quality

Building from Command Line

Using xcodebuild

Build for simulator:
xcodebuild -workspace ios/dpmparceldeliveryapp.xcworkspace \
  -scheme dpmparceldeliveryapp \
  -configuration Release \
  -sdk iphonesimulator \
  -derivedDataPath ios/build
Build for device:
xcodebuild -workspace ios/dpmparceldeliveryapp.xcworkspace \
  -scheme dpmparceldeliveryapp \
  -configuration Release \
  -sdk iphoneos \
  -derivedDataPath ios/build \
  -archivePath ios/build/dpmparceldeliveryapp.xcarchive \
  archive
Export IPA:
xcodebuild -exportArchive \
  -archivePath ios/build/dpmparceldeliveryapp.xcarchive \
  -exportPath ios/build \
  -exportOptionsPlist ios/ExportOptions.plist

Using Expo

Build iOS app with EAS:
eas build --platform ios

Continuous Integration

GitHub Actions Example

name: Build iOS Release

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'
      
      - name: Install dependencies
        run: npm ci
      
      - name: Install CocoaPods
        run: |
          cd ios
          pod install
      
      - name: Setup Xcode
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: 'latest-stable'
      
      - name: Build iOS App
        run: |
          xcodebuild -workspace ios/dpmparceldeliveryapp.xcworkspace \
            -scheme dpmparceldeliveryapp \
            -configuration Release \
            -sdk iphoneos \
            -archivePath ios/build/dpmparceldeliveryapp.xcarchive \
            archive
      
      - name: Export IPA
        run: |
          xcodebuild -exportArchive \
            -archivePath ios/build/dpmparceldeliveryapp.xcarchive \
            -exportPath ios/build \
            -exportOptionsPlist ios/ExportOptions.plist

Troubleshooting

Code Signing Errors

“No signing certificate found”:
  • Install development/distribution certificate in Keychain
  • Verify certificate is valid and not expired
  • Check certificate is trusted
Provisioning Profile Issues:
  • Download latest profile from Developer Portal
  • Delete derived data: rm -rf ~/Library/Developer/Xcode/DerivedData/*
  • Clean build folder in Xcode (Cmd+Shift+K)

Build Failures

Pod install issues:
cd ios
pod deintegrate
pod install
Clear Xcode cache:
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/CocoaPods

TestFlight Processing Issues

  • Verify all required frameworks are included
  • Check for missing symbols
  • Ensure bitcode is enabled if required
  • Review build processing status in App Store Connect

App Store Rejection

  • Read rejection reason carefully
  • Review App Store Review Guidelines
  • Fix issues and resubmit
  • Use Resolution Center for clarification

Version Management

Increment Version

Update version in app.json:
{
  "expo": {
    "version": "1.0.1"
  }
}

Build Number

Increment build number in Xcode:
  1. Select project > Target > General
  2. Increase “Build” number
  3. Keep “Version” in sync with app.json

Next Steps

  • Set up automated deployment with fastlane
  • Configure App Store Connect API key for CI/CD
  • Implement phased release strategy
  • Set up crash reporting (Firebase, Sentry)
  • Monitor analytics and user feedback

Build docs developers (and LLMs) love