trinhngocthuyen / cocoapods-spm

A CocoaPods plugin to add SPM dependencies to CocoaPods-based projects
MIT License
35 stars 7 forks source link

Do not append duplicated lines #68

Open ixrevo opened 2 months ago

ixrevo commented 2 months ago

Hi @trinhngocthuyen First of all I want to thank you for this plugin. It saved me a lot of time and gave me a kick start with my Cocoapods to SPM migration.

When I was trying to add a dynamic SPM package as a dependency for some targets some lines where added to *.xcfilelist files every pods install run. This PR fixes that edge case.

trinhngocthuyen commented 2 months ago

@ixrevo Thank you for using the plugin and for the PR.

I'd love to know more about this issue.

Actually, the current example project does have a dynamic SPM product (SnapKit-Dynamic). I'm trying to reproduce the issue from my end by running pod install multiple times but the xcfilelist's contents do not seem duplicated. I'm referring to Pods/Target Support Files/Pods-EX/Pods-EX-frameworks-Debug-input-files.xcfilelist btw.

For the record, CocoaPods overwrites xcfilelists upon each installation. So their contents should not be affected by previous installations. I'm wondering whether there's a sample project that demonstrates this issue.

Thank you!

ixrevo commented 2 months ago

I'll provide more info a bit later.