Demonstrates how to integrate XCFrameworks and Swift Packages in an application as part of an XCWorkspace.
- FrameworkA encapsulates FrameworkB as a wrapper
- Package-FrameworkA exposes FrameworkA as a Swift Package
- PackageConsumerApp demonstrates use of the Swift Package for FrameworkA
- XCFrameworkConsumerApp demonstrates use of XCFramework for FrameworkA
- Automation provided by scripts (post-archive action and build-phase).
- iOS 16.4+
- Xcode 15.0
- Archives and XCFrameworks for FrameworkA and FrameworkB can be generated by selected the appropriate scheme and using the Archive task in Xcode, this will trigger a post-archive run-script to generate the relevant XCFramework.
You can observe how the consumer apps(s) import FrameworkA
from either the XCFramework or the Swift Package:
import Foundation
import FrameworkA
Christopher Grantham – Twitter/X - LinkedIn
Distributed under the APACHE LICENSE, VERSION 2.0. See LICENSE
for more information.