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
RevenueCat.xcframework.zip not compatible with use in SPM binaryTarget() #2163
Comments
👀 SDKONCALL-193 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
@scogeo thanks for reporting! That's valid feedback. The xcframework was originally meant for folks using Carthage, whose build times are much slower, especially because Carthage will build every single project and target in the repo and we don't have a way to provide a specific manifest, like we do for SPM. But I agree with you - even though SPM is faster because it can build only the specific files it needs, vending a binary alternative would make it faster. I'm adding this to the backlog, but I don't have an ETA for it yet. |
This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Please reach out if you have additional information to help us investigate further! |
oops, this shouldn't have been marked as stale, we still need to integrate the changes |
An alternative approach would be to create a symbolic link to the I modified the Fastfile's
Note: Step 2 is required because The archive then contains:
I validated this locally by updating the RevenueCat
Xcode imported the RevenueCat SDK successfully: Xcode's |
Describe the bug
The
RevenueCat.xcframework.zip
that is produced for each release is not compatible for use as a binary target in swift package manager. Using a pre-compiled xcframework can substantially cut down on build times for both development and CI environments and increase overall productivity. For example one could define aPackage.swift
using a binary target and provide the correct checksum for that release:SPM requires that the zip file contain only the framework and that the framework is available at the root level of the zip file per Apple's documentation. The current xcframework zip file contains a directory at the root named "xcframeworks" and then multiple sub-directories including the
RevenueCat.xcframework
below it as follows:The directory structure, and the
archives
andRevenueCat.dSYMs
seem to be artifacts of how the xcframework was built usingfastlane
and are certainly not needed in the final zip. #1118 already included the dSYMs info directly in the xcframework.The fix is fairly straightforward which is to only include
RevenueCat.xcframework
directory in the final zip file so the structure would be as follows:This would then be compatible with both SPM and Carthage. Note that I have not tested this with Carthage, but there are other projects that provide Carthage xcframework.zip files that are structured in this manner and compatible with SPM.
I already have a PR to fix the issue that I will submit shortly.
useStoreKit2IfEnabled(false)
) (Y/N): N/AThe text was updated successfully, but these errors were encountered: