This project is a fastlane plugin. To get started with fastlane-plugin-privatexcframeworkpackaging
, add it to your project by running:
fastlane add_plugin privatexcframeworkpackaging
Create a Swift package wrapping XCFramework in a private repository.
To use this plugin, you need to use GitHub CLI. Please authenticate your GitHub CLI account beforehand.
Github CLI Github CLI - gh auth login
This plugin performs the following tasks:
- It zips the XCFramework contained in the XCFrameworks directory located directly under the root directory.
- It automatically creates a release version for binary distribution.
- It automatically uploads the XCFramework zip file to the release assets of the release version for distribution.
- It automatically updates the Package.swift file using the uploaded zip file in the release assets.
- It automatically generates a pull request for the release.
Note that the generation of XCFramework needs to be considered separately using some other method.
Create a directory named "XCFrameworks" directly under the project directory. Place the XCFramework that you want to distribute in this directory, which you intend to distribute through a private repository.
mkdir ./XCFrameworks
Create a file named "PrivatePackageConfig.yml" directly under the project directory.
The following is an example entry for "PrivatePackageConfig.yml". Please modify it accordingly to suit your installation environment.
default_branch_name: "main" # Default branch name for repository
package_name: "PrivateXCFrameworkPackagingExampleFramework" # Package name in Package.swift
libraries: # Library item settings included in the Product array (multiple settings possible)
- name: "SampleFramework" # Library Name
targets: # Name of binary target to include in library
- "SampleFramework" # binary target name
binary_targets: # Binary target name. Use the same name as the XCFramework name.
- "SampleFramework" # XCFramework name
For sample projects, please refer to the repository below. PrivateXCFrameworkPackagingExampleFramework
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.