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

Mac Catalyst fixes for Apple Silicon #1

Closed
wants to merge 3 commits into from

Conversation

Arkkeeper
Copy link

I've edited archive-xcframework.sh in order to change the way xcframework built and to disable slice flattening.
Now xcframework is compatible with Mac Catalyst both on x86_64 and arm64 architectures.
This PR fixes bugs described here facebook/flipper#3117


# XCFramework
rm -rf "${BASE_PWD}/Frameworks/${FWNAME}.xcframework"
-destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' \

Choose a reason for hiding this comment

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

this is fascinating, how is this working with arm64 when the arch is specifically x86_64 !?

-framework "Frameworks/iphoneos.xcarchive/Products/Library/Frameworks/${FWNAME}.framework" \
-framework "Frameworks/iphonesimulator.xcarchive/Products/Library/Frameworks/${FWNAME}.framework" \
-framework "Frameworks/maccatalyst.xcarchive/Products/Library/Frameworks/${FWNAME}.framework" \
-output "${BASE_PWD}/Frameworks/${FWNAME}.xcframework"

Choose a reason for hiding this comment

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

I'm also very curious why directory flattening is not needed now but was needed prior 🤔 - I'm pretty sure I'm the source of that flattening code from a year or two back and in my experimentation it was literally the only thing that worked. I believe that was on Xcode 12.4 to start with, before M1 existed. Perhaps the tooling changed a bit. Either way if this actually works for both intel and arm64 macs at the same time, fantastic!

@lblasa
Copy link
Owner

lblasa commented May 11, 2022

Many thanks @Arkkeeper for submitting this PR. I've manually integrated the changes in 095a163

@lblasa lblasa closed this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants