You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a fastlane action to create an .xcframework from the given list of destinations.
Motivation Behind Feature
1. Module Stabilty (available since Swift 5.1)
Without the Module Stability the authors of Swift frameworks are required to rebuild & distribute frameworks for every new Swift version.
Since XCode 11, the framework authors are given an option to build their binaries with Module Stability known as .xcframework.
.xcframework is an Xcode recognised format, that contains binaries for selected Apple platforms and architectures. Xcode will automatically pick the right binary for given architecture (e.g. binary built for simulators will be picked, when building against simulator).
2. Standardized way to integrate closed source binaries in Xcode.
XCFrameworks are the replacement of well adopted concept of fat frameworks that lacks the standardisation and ease of integration within the Xcode.
The problem statement:
Fat framework requires:
the author to create fat framework by combining the binaries built for simulator & device architectures
the integrator to add additional build phase step within the project's target to strip the unneeded architecture (e.g. simulator architecture). Skipping the strip build phase would lead to Appstore rejection.
This tedious handling on both author & integrator side can be resolved by using the .xcframework:
the author will create xcframework for platforms & architectures of interest.
the integrator will drag & drop the .xcframework to his Xcode project. The Xcode will pick the binary with given architecture automatically => no additional build phase needed
Feature Description
Add create_xcframework action to fastlane (similar to build_app)
create_xcframework action would:
1. Archive the given scheme for given list of destinations
In order to correctly archive the framework scheme, pass SKIP_INSTALL=NO & BUILD_LIBRARY_FOR_DISTRIBUTION=YES
Ill gladly help with the implementation, though I'd like to get some feedback to the provided feature request - e.g. how to properly scope the API of such a toolchain action so it would follow the best practices in fastlane. After that prototyping phase, the implementation is actually pretty straightforward
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍
Feature Request
Add a fastlane action to create an .xcframework from the given list of destinations.
Motivation Behind Feature
1. Module Stabilty (available since Swift 5.1)
Without the Module Stability the authors of Swift frameworks are required to rebuild & distribute frameworks for every new Swift version.
Since XCode 11, the framework authors are given an option to build their binaries with Module Stability known as .xcframework.
.xcframework is an Xcode recognised format, that contains binaries for selected Apple platforms and architectures. Xcode will automatically pick the right binary for given architecture (e.g. binary built for simulators will be picked, when building against simulator).
To learn more about the .xcframeworks:
Binary Frameworks in Swift (WWDC '19)
Sample project that excercises the creation & use of xcframeworks
2. Standardized way to integrate closed source binaries in Xcode.
XCFrameworks are the replacement of well adopted concept of
fat frameworks
that lacks the standardisation and ease of integration within the Xcode.The problem statement:
Fat framework requires:
This tedious handling on both author & integrator side can be resolved by using the .xcframework:
Feature Description
Add
create_xcframework
action to fastlane (similar to build_app)create_xcframework
action would:1. Archive the given scheme for given list of destinations
Example:
where binaries in .xcarchive can be located under:
Products/Library/Frameworks
folder for dynamic frameworksProducts/usr/local/lib
folder for static libraries2. Create xcframework from list of archived binaries
Example:
where xcframework_path is the output path
3. Include dSYMs
dSYMs are available in .xcarchives
4. Include BCSymbolMaps
BCSymbolMaps are available in .xcarchives
Sample project that demostrates 1st & 2nd step can be found in this repo
Alternatives or Workarounds
Continue using fat frameworks, that wont offer Module Stability
This is breaking change for users of fat frameworks. When dealing with .xcframeworks, they should
The text was updated successfully, but these errors were encountered: