I am stuck with this error for a while, and none of the solutions I've found seems to work (at least, in my case). Here is the full error log:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
cd "/Users/user/Documents/Music Kit A"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -target x86_64-apple-macosx10.10 -module-name Music_Kit_A -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -g -module-cache-path /Users/user/Library/Developer/Xcode/DerivedData/ModuleCache -I /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Products/Debug -F /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Products/Debug -c -j4 /Users/user/Documents/Music\ Kit\ A/Music\ Kit\ A/AppDelegate.swift /Users/user/Documents/Music\ Kit\ A/Music\ Kit\ A/main.swift -output-file-map /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Objects-normal/x86_64/Music\ Kit\ A-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Objects-normal/x86_64/Music_Kit_A.swiftmodule -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Music\ Kit\ A-generated-files.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Music\ Kit\ A-own-target-headers.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Music\ Kit\ A-all-target-headers.hmap -Xcc -iquote -Xcc /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Music\ Kit\ A-project-headers.hmap -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/DerivedSources/x86_64 -Xcc -I/Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/DerivedSources -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/user/Library/Developer/Xcode/DerivedData/Music_Kit_A-cimwnaollginmxefzprqiioyrhfl/Build/Intermediates/Music\ Kit\ A.build/Debug/Music\ Kit\ A.build/Objects-normal/x86_64/Music_Kit_A-Swift.h
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
What I've tried:
Clean the project
Comment my last changes
Create a new project and transfer the code
When I create a new project, this error goes away, but get another one saying that there is an implicit entry point to main
. Searched the whole project for a main function, but nothing showed up. My whole code is here, if it's of any use.
Try to use xcodebuild -project ***.xcodeproj -scheme ***
, it will give you more details about the error.
For me was adding [unowned self]
to a block inside a block.
In my case this code causes the error:
processBtn.setTitleColor(.whiteColor(), forState: .Normal)
But if i add UIColor everything goes fine:
processBtn.setTitleColor(UIColor.whiteColor(), forState: .Normal)
Maybe you have similar errors in you code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With