Growing an binary framework on iOS that has Swift Applications as characteristic modules that experience 3rd celebration dependencies

I’ve created an SDK.xcframework. This framework has multiple features that are broken in modules. Each module is a swift package. Note that in this below example, Demo is just a Demo app to test the SDK.

├── SDK.xcodeproj
├── Demo
├── DemoTests
├── DemoUITests
├── SDK
    └── Sources
        └── SDK.swift
└── Modules
    ├── Errors
    │   └── Package.swift
    ├── Extensions
    │   └── Package.swift
    ├── FeatureAuthentication
    │   └── Package.swift
    └── NetworkKit
        └── Package.swift

Each module has a Package.swift file. Some of those swift packages have dependencies on other modules in the Modules folder (e.g. FeatureAuthentication needs Networking). Some of the modules have third party swift packages as well.

All of this works fine. I can build this and run this locally on my device. However, I discovered that Apple says an XCFramework cannot rely upon Swift Packages.

This framework is supposed to be something that can be archived and added to other projects. I’m not sure what the best next step is be that a static library or if this structure I currently have could work.

Leave a Reply

Your email address will not be published. Required fields are marked *