xcode - 错误 : conditional compilation flags must be valid Swift identifiers (rather than 'DEBUG” ')

标签 xcode cocoapods xcode9

我正在尝试使用 Xcode 9 beta 6 (9M214v) 构建我的项目。另外,我正在使用 CocoaPods。我已转换为 Swift 4 并更新了我的项目设置,但我一直收到此错误。

到目前为止我尝试过的事情:

  • 清理项目并构建文件夹
  • 删除/重新添加 pod
  • 重启 Xcode
  • 移除事件编译条件标志

有人知道如何解决这个问题吗?

错误信息:

<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

播客文件

target 'iOS Application' do
    use_frameworks!

    pod 'SwiftLint'
    pod 'RealmSwift'
    pod 'ReachabilitySwift'
    pod 'Fabric'
    pod 'Crashlytics'
end

最佳答案

发现错误!在我的 iOS 应用程序 目标的build设置中,位于 Swift Compiler - Custom Flags > Other Swift Flags。在标志的末尾有一个 ", 而不是 "。我不知道这是怎么发生的,但引号导致了错误。

关于xcode - 错误 : conditional compilation flags must be valid Swift identifiers (rather than 'DEBUG” '),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45876616/

相关文章:

ios - 为什么需要在这个人类中添加 2 个私有(private)变量?

ios - 尝试在 View 不在窗口层次结构中的 ViewController 上呈现 UIImagePickerController

iOS Swift 2.0 UITextView 根据文本卡住应用程序

ios - 架构arm64的 undefined symbol

ios - XCode 9 在项目之间切换

ios - 检测 UIScrollView 内容上的触摸事件

ios - 从 CocoaPods 0.35.0 降级到 0.33.1

ios - 使用 React Native 在 IOS 运行时出现 "Unhandled JS Exception: Native module cannot be null"错误

xcode - Xcode 9.0.1 及更高版本有 100+ "Class implemented in both MapKit and VectorKit"警告