Reputation: 303
I'm trying to build my project with Xcode 9 beta 6 (9M214v). Also, I'm using CocoaPods. I've converted to Swift 4 and updated my project settings, but I keep getting this error.
Things I've tried so far:
Active Compilation Conditions
flagsAnyone has an idea how to solve this?
Error message:
<unknown>:0: error: conditional compilation flags must be valid Swift identifiers (rather than 'DEBUG”')
Command /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
Podfile
target 'iOS Application' do
use_frameworks!
pod 'SwiftLint'
pod 'RealmSwift'
pod 'ReachabilitySwift'
pod 'Fabric'
pod 'Crashlytics'
end
Upvotes: 3
Views: 1890
Reputation: 11
I find when you modify your "x-Code" setting for custom flags "Debug" to delete "-D",and then replace your swift language version to "Swift 4.0" ,It will fix your problem! Hoping help you...
Upvotes: 1
Reputation: 303
Found the error! In my iOS Application
target's Build Settings, at Swift Compiler - Custom Flags > Other Swift Flags
. There was a ”, instead of " at the end of the flag. I have no idea how this happened, but the quotation mark caused the error.
Upvotes: 3