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

Add support for referencing zipped .xcframeworks in binding projects. #21294

Open
LeadAssimilator opened this issue Sep 24, 2024 · 0 comments
Open
Labels
binding-projects Issue or PR that affects binding projects enhancement The issue or pull request is an enhancement
Milestone

Comments

@LeadAssimilator
Copy link

Apple platform

iOS, macOS, Mac Catalyst, tvOS

Framework version

net8.0-*

Affected platform version

net8.0_17.5/17.5.8030

Description

It is currently impossible to reference a zipped xcframework from a binding project. Without this ability, one cannot use Visual Studio on Windows as part of their main development workflow with a paired Mac in various cases. While it is supposedly possible to reference zipped xcframeworks from non-binding projects, existing, larger and shared code bases cannot leverage that functionality as their bindings need the clear separation and reusability offered by binding projects.

The main well known limiting factors are due to Windows shortcomings regarding path length limits and symlink support. xcframeworks typically have long paths which run up against the limit and frequently exceed it. And dynamic xcframeworks that target maccatalyst have symlinks which get resolved to real files when they are copied, which breaks linking and/or signing. While both limitations could be overcome with special handling, the easiest solution is to support references to zipped xcframework so they can remain compressed on the Windows side of the build process. While this was done for non-binding projects, the same solution should be applied to binding projects as well.

Steps to Reproduce

  1. Create a binding project with a NativeReference to an xcframework.zip.
  2. Create a test application with a ProjectReference to the binding project
  3. Try to build the test app from VS on Windows
  4. Observe compilation errors
  5. Try to build the test app from cmdline on Mac
  6. Observe different compilation errors

Did you find any workaround?

  1. Make binding projects packable
  2. Set CompressBindingResourcePackage=true
  3. Pack the binding projects
  4. Copy to a local package source
  5. Configure projects to look at local package source
  6. Add package references to the binding project pacakges from the local package source

Build logs

No response

@LeadAssimilator LeadAssimilator added the binding-projects Issue or PR that affects binding projects label Sep 24, 2024
@rolfbjarne rolfbjarne added the enhancement The issue or pull request is an enhancement label Sep 25, 2024
@rolfbjarne rolfbjarne added this to the .NET 10 milestone Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding-projects Issue or PR that affects binding projects enhancement The issue or pull request is an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants