-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Static library framework build for xcframeworks zip #4799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM just a couple things!
@@ -40,7 +40,7 @@ enum CocoaPodUtils { | |||
} | |||
|
|||
/// Information associated with an installed pod. | |||
struct PodInfo { | |||
class PodInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this moving to a class
instead of struct
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment.
case .simulator: | ||
return base | ||
case .device: | ||
// No extra arguments are required for simulator or device builds. | ||
return base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be able to be combined I believe:
case .device, .simulator:
// No extra arguments are required for device or simulator builds.
return base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
private func realFrameworkName(_ framework: String) -> String { | ||
/// The dynamic framework name is different from the pod name when the module_name | ||
/// specifier is used in the podspec. | ||
// TODO: Automatically get the right name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think the TODO
here breaks the formatting in Xcode, do you mind moving it above the TODO above the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
fatalError("Could not create framework directory while building framework \(framework). " + | ||
"\(error)") | ||
} | ||
// Verify Firebase headers include an explicit umbrella header for Firebase.h. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: s/Firebase headers/Firebase frameworks/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/// Packages an XCFramework based on an almost complete framework folder (missing the binary but includes everything else needed) | ||
/// and thin archives for each architecture slice. | ||
/// - Parameter fromFolder: The almost complete framework folder. Includes everything but the binary. | ||
/// - Parameter thinArchives: All the thin archives. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: missing parameters in docs here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Here and other places.
if !fileManager.directoryExists(at: xcframeworksDir) { | ||
do { | ||
try fileManager.createDirectory(at: xcframeworksDir, | ||
withIntermediateDirectories: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this can likely fit on the line above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. 101 characters.
@@ -18,18 +18,16 @@ import Foundation | |||
|
|||
/// A struct to build a .modulemap in a given framework directory. | |||
/// | |||
struct ModuleMapBuilder { | |||
class ModuleMapBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question - what's the reason for making this a class
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not needed. Only the other one needs to be a class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Continue xcframework started in #4737 and the rw-zip-xcframeworks branch
use_frameworks!
in the Podfile. Note that static_framework Pods are still built statically.I've verified the xcframeworks comprised of static framework builds works for the Storage quickstart for iOS and Catalyst.
Future steps:
static_framework
Pods?I need to work on some other tasks after this PR lands - so others are welcome to pick up the work on the xcframework-master branch.
#no-changelog