1、Command CompileSwiftSources failed with a nonzero exit code
Build Setting添加user-defined(点击Level 边上的 + 号),属性为SWIFT_ENABLE_BATCH_MODE,值为NO;重新编译可定位编译失败真正原因
2、initializer element is not a compile-time constant
初始化一个全局变量或static变量时,只能用常量赋值,不能用变量赋值
3、新编译模式(New Build System )编译失败



4、pod install后import时xcode没有代码智能补足
import时没有检测到第三方类库,把pods目录添加到头文件检索的路径,重新编译。

网友评论