CocoaPods / CocoaPods/Xcodeproj

Unwanted diffs for Xcode 16+

Open
#1,018 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
2.4k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

**Background**
Starting from Xcode 16, Xcode adds empty `inputsPaths` and `outputPaths` causing unwanted diffs when running a `pod install`.

**Why This Is a Problem**
These unnecessary entries make the project file needlessly complex and create unwanted diffs.

**Solution**
As a workaround:
```ruby
pre_install do |install|
Xcodeproj::Project::Object::PBXShellScriptBuildPhase.class_eval do
def to_hash_as(method = :to_hash)
hash_as = super
included_keys_for_serialization_when_empty.each do |key|
if hash_as[key].nil?
hash_as[key] = []
end
end
hash_as
end

def included_keys_for_serialization_when_empty
%w(inputPaths outputPaths)
end
end
end
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no file or test; start by locating Xcodeproj::Project::Object::PBXShellScriptBuildPhase and tracing its serialization during pod install. Compare generated project files under Xcode 16+ and confirm that empty inputPaths and outputPaths no longer produce unwanted diffs.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.