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

[iOS] podspec inconsistent naming issue

Open alexp25 opened this issue 1 year ago • 4 comments

I encountered an error regarding the name of the podspec, when installing the plugin on iOS.

[error] Analyzing dependencies
        [!] No podspec found for `RevenuecatPurchasesCapacitor` in
        `../../node_modules/@revenuecat/purchases-capacitor`

The problem seems to be because in the RevenueCatPurchasesCapacitor.podspec file, the name is defined as follows: s.name = 'RevenuecatPurchasesCapacitor'

So instead of RevenueCat is referenced as Revenuecat, and in the Podfile of my app where I installed the plugin it gets picked up as Revenuecat but on adding the plugin it gives the above error.

It seems the name must match the .podspec file name. I managed to get it working by renaming the podspec as RevenuecatPurchasesCapacitor.podspec.

I am using version 7.5.9 of the plugin, as I need it to work on Capacitor 5, not 6, so this should probably be fixed in the previous version too.

alexp25 avatar Jun 09 '24 10:06 alexp25

👀 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 09 '24 10:06 RCGitBot

Hi @alexp25,

Thanks for reporting this, I've sent a message to our SDK team to look into this.

mshmoustafa avatar Jun 12 '24 17:06 mshmoustafa

Hey @alexp25,

Just providing an update here. We're evaluating the best way to handle fixing this if appropriate. While the casing is incorrect we want to make sure we don't make any unnecessary breaking changes in the process of fixing it. Seems like macOS and Windows are both case insensitive by default while Linux is case sensitive by default which is why this had gone undetected for a while. For now your workaround of renaming the podspec is fine until we figure out a more permanent solution.

mshmoustafa avatar Jun 14 '24 19:06 mshmoustafa

Hi @alexp25,

Really sorry for the delay on this. We haven't been able to reproduce but we've got a PR that we believe should fix the issue: https://github.com/RevenueCat/purchases-capacitor/pull/292. Would you be able to test the fix on your end?

You should be able to just change the dependency in your package.json from "@revenuecat/purchases-capacitor": "^7.5.9" to "@revenuecat/purchases-capacitor": "git://github.com/RevenueCat/purchases-capacitor.git#rename-podspec-lowercase".

tonidero avatar Jul 26 '24 14:07 tonidero