Skip to content

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented Mar 7, 2020

Build Swift modules for zip distributions. Swift libraries need to include a .swiftmodule directory in the Modules directory of the framework. This PR sets it up:

Screen Shot 2020-03-07 at 8 29 45 AM

The resulting xcframeworks now can be dragged and dropped into the Firestore quickstart and it runs correctly for iOS and Catalyst.

#no-changelog

@paulb777 paulb777 added the zip-builder Tools related to building the zip file. label Mar 7, 2020
@paulb777
Copy link
Member Author

paulb777 commented Mar 7, 2020

Firestore quickstart running on Catalyst from the xcframework zip
Screen Shot 2020-03-07 at 9 21 28 AM

Copy link
Contributor

@maksymmalyhin maksymmalyhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general.

To validate the logical correctness I am missing some details on the folder structures (the one constructed by Cocoapods and the one we would like to have as a result). I thing it will be valuable to add some high level description (or at least doc links) on it (either in comments or an .md file, etc.) to simplify understanding the code in the future.

// For Swift modules, we use the modulemap from the xcodebuild. For Objective C modules,
// We use the constructed module map that includes required framework and library
// dependencies.
if !makeSwiftModuleMap(thinArchives: thinArchives, destination: destination) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please break this out into separate lines with an appropriately named variable for the return statement? It's a little tough to read right now, reading it as if don't make Swift module map but the function itself has side-effects. Maybe something like:

let builtSwiftModules = makeSwiftModuleMap(thinArchives: thinArchives, destination: destination)
if !builtSwiftModules {
  // Contents of block...
}

@paulb777
Copy link
Member Author

paulb777 commented Mar 9, 2020

I flushed out the comments and cleaned up the boolean logic.

@paulb777 paulb777 merged commit 8c3d951 into xcframework-master Mar 9, 2020
@paulb777 paulb777 deleted the pb-zip-swift-modules branch March 9, 2020 16:42
paulb777 added a commit that referenced this pull request Mar 13, 2020
doudounan pushed a commit that referenced this pull request Mar 19, 2020
* Move UpdateFirebasePod to Swift's ArgumentParser library. (#4993)

* Move UpdateFirebasePod to Swift's ArgumentParser library.

This was introduced in URL, leaving a nice clean way to provide command
line arguments.

Example output:

```
$ swift run UpdateFirebasePod
Error: Missing expected argument '--git-root <git-root>'
Usage: firebase-pod-updater --git-root <git-root> --current-release <current-release>

```

* Removed unnecessary file.

* Fixed formatting.

* Use existing argument name for currentRelease.

* Sorted package dependencies.

* Pin to exact version.

* Rename UpdateFirebasePod to firebase-pod-updater

This sticks with convention expected by the tooling. Future PRs will change the `ReleasePackager` and other tools as well.

* Renamed pod updater. (#5003)

* Upload Symbols 3.1 (#4988)

* Crashlytics Update CHANGELOG.md for v4.0.0-beta.5 (#5004)

* Checks for connectivity when App is moving to foreground. (#4985)

* Checks for connectivity when App is moving to foreground.

* Split MaybeInvokeCallbacks and invoke them when foregrounding and network is available.

* Update CHANGELOG for Firestore v1.11.1 (#5008)

* Support AB testing of Firebase In-App Messages (#5005)

* Parse out experiment payload for experimental FIAMs and store it on FIRIAMMessageDefinition

* Fix bugs in parsing experimental payload

* Add nullable experiment payload to FIAM message definition. Add method in FIRExperimenmtController to validate running experiments and call this when new messages are fetched from FIAM backend

* Add and document new ABT methods, update FirebaseInAppMessaging.podspec to depend on ABT

* Clean up deprecated public message initializers, add experiment payload to private initializers

* Activate experiment for experimental messages upon impression

* Clean up activateExperiment API

* Add experimental payload to all message definition initializers

* Add unit test coverage for new ABT methods

* Add test coverage for parsing experimental messages

* Verify experiment payload gets passed to message superclass

* Scripts/style.sh

* Update Podfile for UI test app to include AB Testing SDK

* Add back deprecated initializers for now, these are needed for the test app

* Test for non-nil experiment payload

* Use mutable array directly, better memory usage

* Bump ABTesting podspec version, depend on new ABT in FIAM

* Remove mentions of FIREventOrigins.h

* Remove experiment payload from public API, hide it in private

* Scripts/style.sh

* Fix comment indentation, allow for FIAM to depend on minor version updates of ABTesting

* Move ABTExperimentPayload import to private header

* Core M66 changelog update (#5013)

* Core M66 changelog update

* Core M65 notes corrected.

* FirebaseStorage.podspec - update Core dependency version to one supporting watchOS (#5014)

* Update versions for Release 6.19.0

* Add FirebaseABTesting to travis cron tests (#5015)

* GoogleDataTransportCCTSupport - bump GoogleDataTransport dependency to ~> 5.0

* FirebaseCoreDiagnostics 1.2.2 - bump GoogleDataTransportCCTSupport dependency to ~> 2.0 (#5016)

* M66 FirebaseCoreDiagnostics added to the release manifest (#5018)

* M66 FIAM GoogleDataTransportCCTSupport dependency bump to '~> 2.0' (#5019)

* update storage changelog (#5017)

* Integrating GoogleDataTransport in Crashlytics to Report Crashes  (#4989)

* Remove setting CMAKE_BUILD_TYPE in CMakeLists.txt (#5027)

This really needs to be set on the command-line if it's to be effective,
and setting it here breaks downstream projects that include
firebase-ios-sdk as a subdirectory.

* Consolidate the Google Analytics origin for Crashlytics. Only use "clx". (#5030)

* Fix assertions not printing correctlty (#5026)

* M66 changelog for FIAM and ABT SDKs (#4920)

* M65 changelog for ABT SDK

* Improve CHANGELOG notes

* Fix CHANGELOG version

* M66 changelog for both FIAM & ABT

* Fix formatting

* Fix formatting pt2

* Put deprecated method in backticks

* add Installations to docs script (#5035)

* Update GDT and GDTCCT CHANGELOGs (#5034)

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG for M66. (#5036)

* Update CHANGELOG for M66.

* Update CHANGELOG.md

* Fix typos in doc comments (#5038)

* Cherry Pick Crashlytics Upload Symbols (#5046)

* Fix compilation under Linux/GCC 9.2.1 in Release mode (#5042)

The `firebase_firestore_protos_libprotobuf` library contains
protoc-generated code. Compile with standard flags rather than
Firestore's default of `-Wall -Wextra -Werror`.

* Fix nightly zip GHA build (#5041)

* CocoaPods 1.9.1 (#5050)

* Cherry Pick Crashlytics Upload Symbols (#5046) (