Episode #504

Swift Package Modules

Series: Modular Project Architecture

13 minutes
Published on September 20, 2021

This video is only available to subscribers. Get access to this video and 572 others.

In this episode we create a modularized setup where our modules are Swift Packages and brought into the main app using Xcodegen and local path references to the packages.

Adding local modules with xcodegen:

name: DinnerTime
options:
  bundleIdPrefix: com.ficklebits.dinnertime
packages:
  Util:
    path: "../Modules/Util"
  Core:
    path: "../Modules/Core"
  Store:
    path: "../Modules/Store"
targets:
  App:
    type: application
    platform: "iOS"
    deploymentTarget: "14.0"
    sources: [Source]
    dependencies:
      - package: Util
      - package: Core
      - package: Store
  ...

This episode uses Ios 14.5, Xcodegen 2.24.0, Xcode 12.5.