SolvedCocoaPods Pod with swift 4.2 fails at linting

When I try to lint (pod lib lint) this branch: https://github.com/pedrommcarrasco/Constrictor/tree/swiftMigration4.2

I get the following error:

note: Using new build system
    note: Planning build
    note: Constructing build description
    Build system information
    warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')

    Build system information
    warning: duplicate output file '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist' on task: ProcessInfoPlistFile /Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist /var/folders/0m/813c6pxs0dldbpnc178tdjl42j04dh/T/CocoaPods-Lint-20180920-15882-raz55r-Constrictor/Pods/Target Support Files/Constrictor/Constrictor-Info.plist (in target 'Constrictor')

    Build system information
    error: Multiple commands produce '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist':
    1) Target 'Constrictor' (project 'Pods') has copy command from '/Users/pedro.carrasco/Desktop/Personal/Constrictor/Constrictor/Constrictor/Info.plist' to '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist'
    2) Target 'Constrictor' (project 'Pods') has process command with output '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist'

    ** BUILD FAILED **

   Testing with `xcodebuild`.
 -> Constrictor (2.0.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
    - NOTE  | [iOS] xcodebuild:  warning: duplicate output file '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist' on task: ProcessInfoPlistFile /Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist Target Support Files/Constrictor/Constrictor-Info.plist (in target 'Constrictor')
    - NOTE  | [iOS] xcodebuild:  error: Multiple commands produce '/Users/pedro.carrasco/Library/Developer/Xcode/DerivedData/App-hbzpghxpiyguluaeksouvryobhqo/Build/Products/Release-iphonesimulator/Constrictor/Constrictor.framework/Info.plist':

[!] Constrictor did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.

After searching around, some solutions mentioned removing info.plist from Compile Sources (if it was there) or selecting the legacy build system. The problem is, both things seem to be πŸ›  and not proper solutions.

Any idea of what's currently happening? Is it a known issue? Or am I doing something wrong?

16 Answers

βœ”οΈAccepted Answer

The podspec contains s.source_files = "Constrictor/Constrictor/**/*" which includes all files including Info.plist files that are being added as if they are source files.

Either move the files outside the glob or use s.exclude_files = "Constrictor/Constrictor/*.plist" to exclude these files from compilation.

I did the latter and it worked:

    ** BUILD SUCCEEDED **
    
   Testing with `xcodebuild`. 
 -> Constrictor (2.0.0)
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  note: Using build description 'ba0fe2dc4c9c98ae5663b904c749b4bf'
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
    - NOTE  | [iOS] xcodebuild:  note: Using eager compilation
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, trace file: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-bytkfslwanytkaexgvgdexglehlg/Build/Intermediates.noindex/XCBuildData/buildDebugging-559171842.26113/build.trace'
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, current manifest: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-bytkfslwanytkaexgvgdexglehlg/Build/Intermediates.noindex/XCBuildData/buildDebugging-559171842.26113/current-manifest.xcbuild'
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, current serialized description: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-bytkfslwanytkaexgvgdexglehlg/Build/Intermediates.noindex/XCBuildData/buildDebugging-559171842.26113/current-desc.xcbuild'000gn/T/CocoaPods-Lint-20180920-88638-wzfma2-Constrictor/App.xcworkspace` for inspection.

More Issues: