purchases-capacitor icon indicating copy to clipboard operation
purchases-capacitor copied to clipboard

Add SPM Support

Open paulstelzer opened this issue 6 months ago • 3 comments

Please add support for SPM (cocoapods are deprecated). There was already an issue (https://github.com/RevenueCat/purchases-capacitor/issues/350) but this was closed and was not opened anymore although it is not completed. A Package.swift file is missing.

To convert the plugin please see https://github.com/ionic-team/capacitor-plugin-converter

paulstelzer avatar Jun 04 '25 05:06 paulstelzer

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

RCGitBot avatar Jun 04 '25 05:06 RCGitBot

Hi @paulstelzer, I'm very sorry about the delay on this reply. We've been auditing our ticketing system and found that your ticket was never resolved. Can you let me know if you are still seeing this issue on our most recent SDK versions 10.3.8 or 11.2.3?

HaleyRevcat avatar Oct 03 '25 00:10 HaleyRevcat

@HaleyRevcat This is still an issue. The plugin has not fulfilled the steps to add SPM support (see https://capacitorjs.com/docs/ios/spm#converting-existing-plugins-to-spm)

paulstelzer avatar Oct 10 '25 17:10 paulstelzer

Definitely need to prioritize this please. I am going to open a pull request on a fork.

khallmark avatar Nov 10 '25 18:11 khallmark

Opened #595 but it may require some changes to be to your liking.

khallmark avatar Nov 10 '25 19:11 khallmark

I redid the SPM PR today based on issues I had installing it in my app locally. This version duplicates the iOS code and relocates everything into the preferred SPM structure. You can likely eliminate the duplicate files by editing the Podspec but I wanted to leave the working Cocoapods configuration intact. All other Capacitor plugins we've tried to use already have SPM support so this will, at least, unblock people who have already migrated to SPM.

khallmark avatar Nov 11 '25 18:11 khallmark

I have hit too many issues with this and I've been directed to take a different approach. I'll leave the PR open with my progress but Xcode is currently crashing.

khallmark avatar Nov 11 '25 21:11 khallmark