spotify / XCRemoteCache

Other
825 stars 50 forks source link

[Cocoapods] Ensure the source build phase exist before enabling xcrc #218

Closed polac24 closed 11 months ago

polac24 commented 11 months ago

Instead of calling Xcodeproj's source_build_phase, which creates a phase if it doesn't exist, try to find it manually.

https://github.com/CocoaPods/Xcodeproj/blob/2ce68b60856c4680c2b3cd7aa5b221529120c7c4/lib/xcodeproj/project/object/native_target.rb#L615-L621

There will be no warnings, as having a "side" target that doesn't compile anything is completely legit and it is expected that XCRemoteCache just ignores it.

Fixes #217