cocoapods-frost
cocoapods-frost copied to clipboard
📦 A plugin for CocoaPods that creates XCFramework(for internal distribution) for speeding up build time.
cocoapods-frost
A plugin for CocoaPods that creates XCFramework(for internal distribution) for speeding up build time.
🚜 Still working on development, but partially works
Alternatives
Support this project
If you are interested in this project or you need
- Hit the ⭐️ button to make this project popular.
- Becoming sponsorship in subscription or one-time.
Features
- Supports static or dynamic by
use_frameworks! :linkage => :static - Supports coexisting in source code and frameworks
known Issues
Managed in issues
- Supports only iOS currently
- some pods fails build
- especially, already provided as framework
- if you found such pod, please report it from issues
- Does not create xcframework for implicit dependencies from a pod
- Make it explicit using
frost_pod. - For instance,
frost_pod 'Alamofire'forfrost_pod 'Moya'
- Make it explicit using
- Multiple specifying pods with
podandfrost_pod- Do not use
podandfrost_podin different target. Please use either one.
- Do not use
- Not inherited current install version in pod
- Specify install version (e.g.
pod 'some', "1.2.0")
- Specify install version (e.g.
- Not supported yet building pod that has resource
Attention
- Should build all of targets when pod updated - partially building might causes linking error (compile-time or dynamic-linking-time)
- Future updates, completely isolated pods can be build partially.
How it works
- Defines pod by
frost_podthat creates XCFramework. - Builds and creates XCFramework with
-allow-internal-distributionfrom build settings CocoaPods generated. - Generates a
podspec.jsonthat installs XCFramework asvendored_frameworks frost_poduses that generated podspec as a local pod. which installs XCFramework instead of sources.
Making XCFrameworks
Make bundler installs cocoapods-frost
Gemfile
gem 'cocoapods-frost', git: "https://github.com/muukii/cocoapods-frost.git", branch: "main"
Annotate Podfile that uses cocoapods-frost as plugin
Podfile
plugin "cocoapods-frost"
Specifies pods with pod_frost that needs to create XCFramework.
Still, using pod can be left to build from source code.
Podfile
frost_pod "Moya"
frost_pod "MondrianLayout"
pod "JAYSON"
Build XCFrameworks
$ bundle exec pod frost
Then
$ bundle exec pod install
Updating pods
Use --update-pods to update pods
$ bundle exec pod frost --update-pods=RxSwift
Directory structure
- Repository
- Podfile
- Podfile.lock
- FrostPodfile.lock
cocoapods-frostcreates, should be managed in git - Pods
- FrostPods <-
cocoapods-frostcreates- GeneratedPods (should be managed in git, git-lfs, something else)
About subspecs
CocoaPods integrates multiple subspecs into one module.
Generated XCFramework contains all of subspecs specified in Podfile.
For instance,
https://github.com/Moya/Moya/blob/master/Moya.podspec
frost_pod "Moya/Core"
frost_pod "Moya/Combine"
that creates Moya.xcframework includes core implementation and combine supports.
So frost_pod specifies as whole pod with dropping subspec specifiers.
Development
It supports debugging in VSCode.
License
MIT