Zek
Zek

Reputation: 254

Xcode Swift target overrides the `SWIFT_INCLUDE_PATHS`

I just switched from Carthage to Cocapods for an older Swift project. When I run "pod install", I get a warning (one for Debug and one for Release):

[!] The 'POS Pad [Debug]' target overrides the SWIFT_INCLUDE_PATHS build setting defined in `Pods/Target Support Files/Pods-POS Pad/Pods-POS Pad.debug.xcconfig'. This can lead to problems with the CocoaPods installation

The problem is that I cannot find any "Swift Include Paths" setting anywhere under Build Settings. I am using Xcode 13.4.

Where can I find this setting and get rid of the warnings?

Upvotes: 1

Views: 636

Answers (1)

Zek
Zek

Reputation: 254

I took another stab at this and found a way to get rid of the warnings.

When looking at the project.pbxproj file directly, the setting SWIFT_INCLUDE_PATHS was actually present under release and debug. However, both were set to "$(default)", so they were not overriden like Cocoapods claimed they were.

To handle:

  1. Edit the project.pbxproj file and delete the two lines (after making a copy of the file to be safe).
  2. pod deintegrate
  3. Delete derived data (rm -rf ~/Library/Developer/Xcode/DerivedData/*)
  4. In Xcode, Clean Build Folder

After the above, pod install ran without warnings or errors.

Note: step 2-4 above might not have been needed.

Hopefully this helps somebody if they have a similar issue...

Upvotes: 1

Related Questions