-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support xcframeworks #2801
Support xcframeworks #2801
Conversation
@ikesyo @mdiep @jdhealy @NachoSoto can anyone please give a first review pass? The review path should be: build command -> archive command -> bootstrap with |
I don't take a deeper look yet, but I think that the XCFrameworks should not be in |
The way I implemented it, the .xcframework created by Carthage contains platform+platformsimulator, never multiple platforms. |
I haven’t looked at the code yet, but I would expect the Xcode command to generate these for all platforms? If not, we probably do need to change that, as the main advantage of this is to be able to finally get rid of |
It does, just it doesn't combine tvOS and watchOS in the same .xcframework. It combines tvOS + tvSimualtor in one xcframework bundle where inside there are 2 separate framework bundles each for slices for the correct architecture. They are not fat binaries anymore. So there radar problem is solved. |
@ikesyo I think that technically you are correct, I imagine the format would support placing all platforms in one .xcframework . If one did that then it wouldn't make sense to go with I didn't go that way since I'm not sure how this is expected to be used. However the platform specific .xcframeworks could be just repacked in another .xcframework in the end if we wanted to do so. |
It will be okay as a first step 😃 |
I'm not sure what else is supposed to happen to support Catalyst ? Can anyone point me to more documentation? https://developer.apple.com/documentation/uikit/creating_a_mac_version_of_your_ipad_app |
My guess for Catalyst is that the XCFramework needs to contain both iOS and macOS versions so that the correct platform can be chosen. |
It's a bit more complicated than that unfortunately. With some help from @owensd on Twitter I managed to rebuild my app's dependencies and get things running. A I assume this can be done through the command line but I couldn't figure it out so here are my manual Xcode steps. As usual with these things I'm not sure all of them are required but they got things working.
I'm sure there's a way to maintain a framework's native macOS support while also offering UIKit for Mac support but I'm not sure how. I guess you would need two Mac build destinations? Hope that helps. |
@mdiep just tried that, didn't work :( @samrayner thanks for all the information. I'll see what I can make of it |
There are 2 issues to solve:
|
example build command:
|
This comment has been minimized.
This comment has been minimized.
I don't think it makes sense to merge this to master until Xcode 11 is out of beta. The latest beta changed the naming convention of "uikitformac" to "maccatalyst" which breaks this implementation and we don't know what other changes are coming in the future. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Catalina GM and Xcode 11 GM have been out, and it seems quite a few PRs exist to enable the ability to build .xcframeworks for catalyst support. So, curious to know what the hold up is? 🤔😢 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
When this support will be available? |
Is there still no Mac Catalyst support in Carthage? |
I've been begrudgingly moving all of my Carthage frameworks to CocoaPods and to SPM when available. I love Carthage but not supporting Mac Catalyst is becoming a non-starter for me. |
adding XCFramework support would be the best way to fix this -> #3019 introduced by Xcode 12 betas |
For anyone else who was watching this issue, it looks like xcframework work has continued in this other PR: #2881 |
Implement support for #2799
This feature involves:
build