Skip to the content.

iOS Development

iOS development within the SMI ecosystem follows the “PWA First” strategy, but utilizes native shells ( Capacitor/Cordova) or pure native code (Swift) when platform-specific limitations are encountered.

Information

iOS is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company’s mobile devices, including the iPhone and iPad.

Installation

iOS development requires macOS.

  1. Xcode: Install the latest version of Xcode from the Mac App Store.
  2. Xcode Command Line Tools:
    xcode-select --install
    
  3. Homebrew: Recommended for managing dependencies.
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  4. CocoaPods: (If using Cordova or older plugins)
    sudo gem install cocoapods
    

Configuration

Project Settings

Most configuration is done within Xcode (.xcodeproj or .xcworkspace).

Multi-SDK and Environment Support

CLI Usage

Building

Testing Execution

Cryptography and Secure Storage

CI/CD Integration

iOS CI/CD requires macOS environments and typically uses Fastlane for automation.

Runner Requirements

GitHub Actions Example

Using ruby/setup-ruby with bundler-cache is the recommended way to manage Fastlane and its dependencies.

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.2'
          bundler-cache: true
      - name: Build and Sign
        run: bundle exec fastlane build_and_sign
        env:
          MATCH_PASSWORD: $
          APP_STORE_CONNECT_API_KEY_ID: $
          APP_STORE_CONNECT_API_KEY_ISSUER_ID: $
          APP_STORE_CONNECT_API_KEY_CONTENT: $

Signing and Provisioning

For CI, use Fastlane match to manage certificates and provisioning profiles. It ensures all developers and CI runners use the same identities.

Xcode Selection

Pin Xcode to a specific version to avoid unexpected toolchain changes:

- name: Select Xcode
  run: sudo xcode-select -s "/Applications/Xcode_15.3.app/Contents/Developer"

Caching

Cache CocoaPods, Swift Package Manager (SPM), and DerivedData to reduce build times:

- name: Cache CocoaPods
  uses: actions/cache@v4
  with:
    path: Pods
    key: $-pods-$
    restore-keys: |
      $-pods-

- name: Cache SPM
  uses: actions/cache@v4
  with:
    path: |
      ~/Library/Caches/org.swift.swiftpm
      ~/.swiftpm
    key: $-spm-$
    restore-keys: |
      $-spm-

- name: Cache DerivedData
  uses: actions/cache@v4
  with:
    path: ~/Library/Developer/Xcode/DerivedData
    key: $-deriveddata-$
    restore-keys: |
      $-deriveddata-

App Store Connect API Key and Match Access

Release Notes and Metadata

Managing release notes for the App Store is handled through App Store Connect.

Automated Release Notes (Fastlane)

If using Fastlane Deliver, release notes are managed in the fastlane/metadata directory:

fastlane/metadata/en-US/release_notes.txt

Each language has its own folder. The file release_notes.txt contains the “What’s New in This Version” text.

Manual Release Notes

In App Store Connect:

  1. Select your app.
  2. Go to TestFlight > Test Information (for beta notes).
  3. Go to App Store > Version > What’s New in This Version (for production notes).

Signing and App Store Process

iOS apps must be signed by Apple-issued certificates.

  1. Certificates: Managed in the Apple Developer Portal (Development vs. Distribution).
  2. Provisioning Profiles: Links your App ID, Certificates, and Devices.
  3. Fastlane: Recommended for automating the signing and submission process.
    fastlane match # Manage certificates
    fastlane release # Build and upload to TestFlight
    

Usage, tips and tricks

Coding tips and tricks

See also