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

visionOS in Release xcFramework #3031

Open
fishandphil opened this issue Aug 16, 2023 · 9 comments
Open

visionOS in Release xcFramework #3031

fishandphil opened this issue Aug 16, 2023 · 9 comments
Labels
build Changes that affect the build system triaged xrOS

Comments

@fishandphil
Copy link

Good evening,
We've started our work to support visionOS natively and this includes supporting RevenueCat for visionOS.

We need xcFramework and usually find them in your release section: https://github.com/RevenueCat/purchases-
ios/releases/tag/4.25.4

While we can see that you have been working on it from some commit, while we download the xcFramework, we don't see its segment.

Screenshot 2023-08-16 at 23 24 41

Can you let us know "why" and how we can fix it? Our product is using multiple framework and from our understanding, it is not great to use SPM creates a static library while we're looking for dynamic..

Thank you very much

@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@NachoSoto
Copy link
Contributor

NachoSoto commented Aug 16, 2023

Thanks for the report.

We build the XCFramework attached to each release using Carthage + the latest stable version of Xcode.
In order to include visionOS we'd need 2 things:

The first part won't be an issue after Xcode 15 RC. But for Carthage, we'll need that PR or Carthage/Carthage#3345 to be released.

@NachoSoto NachoSoto added blocked build Changes that affect the build system xrOS and removed enhancement labels Aug 16, 2023
@NachoSoto
Copy link
Contributor

I totally understand your pain wanting to use a dynamic library though. I wish SPM allowed configuring how to link dependencies.
This is a possible workaround for you: https://stackoverflow.com/a/70812112

@fishandphil
Copy link
Author

Thank you for your speedy response and information.

Couldn't you consider making available a special xcFramework in the next Release that is labeled "Xcode beta 15", so it can be embedded in apps that wishes to use visionOS?
Temporarily until a RC comes out.. but since they will not release Vision Pro devices until next year, that might take a while..

Cheers

@NachoSoto
Copy link
Contributor

NachoSoto commented Aug 22, 2023

An update here: we're going to look into moving away from Carthage (since it's pretty much abandoned) and using raw xcodebuild commands to generate our XCFrameworks. This way we'll be able to add a visionOS "slice".

I don't have an ETA for that but we'll keep you posted.

@NachoSoto
Copy link
Contributor

Update: turns out our automation already builds the xcframeworks using xcodebuild directly. So we'll ship a release with it as soon as Xcode 15 RC is out :)

@fishandphil
Copy link
Author

I totally understand your pain wanting to use a dynamic library though. I wish SPM allowed configuring how to link dependencies. This is a possible workaround for you: https://stackoverflow.com/a/70812112

@NachoSoto I went back to look at the link you posted here. Apparently, it is possible for SPM to create a dynamic library by simply adding the "type: .dynamic," to the ".library" array of the product within the package.swift file.

I am simply wondering why you don't do it yourself for the whole repository? there must be a reason?

Thank you 🙏🏻

@NachoSoto
Copy link
Contributor

@NachoSoto I went back to look at the link you posted here. Apparently, it is possible for SPM to create a dynamic library by simply adding the "type: .dynamic," to the ".library" array of the product within the package.swift file.

Because that would remove the "automatic" behavior and force everyone to link it dynamically. But not including it, it allows Xcode to link dynamically or statically as needed.

NachoSoto added a commit that referenced this issue Jan 17, 2024
NachoSoto added a commit that referenced this issue Jan 17, 2024
NachoSoto added a commit that referenced this issue Jan 17, 2024
NachoSoto added a commit that referenced this issue Jan 17, 2024
NachoSoto added a commit that referenced this issue Jan 18, 2024
@NachoSoto NachoSoto removed the blocked label Jan 18, 2024
NachoSoto added a commit that referenced this issue Jan 18, 2024
NachoSoto added a commit that referenced this issue Jan 30, 2024
NachoSoto added a commit that referenced this issue Feb 1, 2024
@NachoSoto
Copy link
Contributor

This will be fixed with #3583, shipped on the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system triaged xrOS
Projects
None yet
Development

No branches or pull requests

3 participants