Remove all occurrences of (null) in Sources lines in your project.pbxproj:
sed -i '' '/(null) in Sources /d' YOURPROJECT.xcodeproj/project.pbxproj
Remove all occurrences of (null) in Sources lines in your project.pbxproj:
sed -i '' '/(null) in Sources /d' YOURPROJECT.xcodeproj/project.pbxproj