Skip to content
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

XCFramework Rework #9720

Merged
merged 7 commits into from
Apr 21, 2020
Merged

XCFramework Rework #9720

merged 7 commits into from
Apr 21, 2020

Conversation

amorde
Copy link
Member

@amorde amorde commented Apr 16, 2020

Closes #9528
Closes #9670
Closes #9525

Requires CocoaPods/cocoapods-integration-specs#280

This PR reworks how xcframework are handled by moving the selection of the correct "slice" to the pod target instead of the aggregate target, similar to what was done in #9547

This also adds support for xcframeworks that wrap static libraries, as described in #9528.

Implementation Details

A new script phase Embed XCFrameworks is added to the Pod Target that contains the vendored xcframework. This script copies the correct slice (either a .framework or static lib + headers) to ${PODS_XCFRAMEWORKS_BUILD_DIR}/[xcframework_name]/. The existing Embed Frameworks script will then import the framework from ${PODS_XCFRAMEWORKS_BUILD_DIR}/[xcframework_name]/ to the target build directory.

${FRAMEWORK_SEARCH_PATHS} and/or ${LIBRARY_SEARCH_PATHS} now include ${PODS_XCFRAMEWORKS_BUILD_DIR}/[xcframework_name]/ if a relevant xcframework exists for a given host target.

${HEADER_SEARCH_PATHS} now includes ${PODS_XCFRAMEWORKS_BUILD_DIR}/[xcframework_name]/Headers if relevant static-library-based xcframeworks exist for a given host target.

CHANGELOG.md Outdated Show resolved Hide resolved
@amorde
Copy link
Member Author

amorde commented Apr 17, 2020

@icecrystal23 @radazzouz would love if you could give this a try

@radazzouz
Copy link

Thanks for the heads up, @amorde!

I checked out this branch and the required submodule branch and building works on iOS (both simulator and device) and Mac Catalyst. However, the dSYMs are no longer present in the archives. dSYMs work great in 1.9.1 stable.

The BCSymbolMaps are working as expected.

@icecrystal23
Copy link
Contributor

icecrystal23 commented Apr 17, 2020

Update: With a corrected Gemfile, this is working for the example project that was failing for me before 👍

@dnkoutso
Copy link
Contributor

@icecrystal23 you need to bump cocoapods-core gem to master as well.

@amorde
Copy link
Member Author

amorde commented Apr 20, 2020

Thank you both for testing this so quickly 🙏 will work on the dSYMs

@amorde
Copy link
Member Author

amorde commented Apr 20, 2020

@radazzouz dSYMs should be fixed!

@radazzouz
Copy link

radazzouz commented Apr 20, 2020

@radazzouz dSYMs should be fixed!

I just pulled and retested and I confirm that dSYMs are not working again for both iOS and Mac Catalyst archives.

@amorde
Copy link
Member Author

amorde commented Apr 20, 2020

I tested with an iOS archive and was able to see dSYMs being included. Do you see a “Copy dSYMs” script build phase on the pod target?

@radazzouz
Copy link

Do you see a “Copy dSYMs” script build phase on the pod target?

Yes. This is what I am seeing:

Screen Shot 2020-04-20 at 12 22 19 PM

Screen Shot 2020-04-20 at 12 21 32 PM

@segiddins segiddins removed their request for review April 20, 2020 18:56
@amorde
Copy link
Member Author

amorde commented Apr 20, 2020

I tried using the sample you provided for #9530 and I'm seeing the dSYMs in the archive

Screen Shot 2020-04-20 at 2 46 45 PM

Have you tried the typical clean build / DerivedData / etc.? If so, do you see something like this at the bottom of the Copy dSYMs script?

Screen Shot 2020-04-20 at 2 49 15 PM

would love to figure out why this isn't working for you

@radazzouz
Copy link

My apologies for the confusion, @amorde!

I mistyped in #9720 (comment) the dSYMs are working fine for me.

@amorde
Copy link
Member Author

amorde commented Apr 21, 2020

Oh great! No problem, thank you both for taking time to test this, much appreciated

@shamilovtim
Copy link

Hello, can someone please look at this regression?

Currently experiencing vendored_frameworks + multiple xcframeworks broken. This appeared as a regression in our project after this work got merged in a later CocoaPods version. It looks like after the issue was caught no one has fixed it? I don't know what people are doing to work around it either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants