Example Xcode project with SPM and CocoaPods dependencies.
- Clone repository
- Run
bundle install
- Run
bundle exec pod install
- Open
SPMDemo.xcworkspace
in Xcode - Build/Run/Test using provided shared build schemas
Following diagram explains how the project is structured:
+-----------+ +-------------------+
| App +<--------------+ Commons |
+---+---+---+ +---+---+---+---+---+
^ ^ | | ^ ^
| | | | | |
| | +---------------+ | | | | +---------------+
| +---+ Feature A +<--+ | | +---+ Library A |
| +---------------+ | | +---------------+
| | |
| | |
| +---------------+ | | +---------------+
+-------+ Feature B +<------+ +-------+ Library B |
+---------------+ +---------------+
Diagram element | Description |
---|---|
[App] |
Main application target |
[Feature] |
Feature framework target |
[Commons] |
Shared framework target |
[Library] |
Third-party dependency |
[A]<--[B] |
Module A requires module B |
Third-party dependencies are available in the main app target, as well as in the feature framework targets.
Dependencies are added to Commons
target as statically linked libraries.
Dependencies are added to Commons
target as statically linked frameworks. All targets that use third-party pods (including unit tests targets) have CocoaPods integration enabled and inherits search paths from Commons
target.
Copyright © 2020 Dariusz Rybicki Darrarski
License: GNU GPLv3