fermoya / cocoapods-catalyst-support

Ruby extensions to help you configure your pods project so that pods not compiled for Catalyst can still be used for iOS devices
MIT License
111 stars 18 forks source link

[BUG] Pod is removed from catalyst builds without adding it to `catalyst_configuration` #22

Closed tamasjager closed 3 years ago

tamasjager commented 3 years ago

Describe the bug Hey, we're using a local pod that is always removed from the catalyst build even if we don't specify it in catalyst_configuration. The pod has StoreKit in its name and we suspect an over-eager name matching causes this unnecessary removal.

In a previous version of this script, this line was the main offender in the uninstall function: lines_to_replace = snippet.filter_lines do |line| line.include? "#{key}" end.to_set.to_a which we remedied locally by requiring an exact match: lines_to_replace = snippet.filter_lines do |line| line.match "\/#{key}" end.to_set.to_a

I didn't find the relevant part in the new codebase.

We fixed the issue by renaming the local pod but maybe this is something you'd like to take a look at. Thanks in advance!

Podfile Relevant part: pod 'MKStoreKit', :path => '../MKStoreKit'

Environment

fermoya commented 3 years ago

Hi @tamasjager , the line you mention should be in native_target.rb but this is something that should definitely be solved.

So rather than checking if Foo is included in the bash file your fix tries to match /Foo to avoid fake matches like MKFoo, for instance. Is that right?

tamasjager commented 3 years ago

Yes. In the meantime my colleague made a PR with the same fix https://github.com/fermoya/cocoapods-catalyst-support/pull/23.

fermoya commented 3 years ago

Thanks @tamasjager . I'll release a version shortly, thanks for the fix

fermoya commented 3 years ago

version 0.1.3 released 🚀