Skip to content

Xcode6 各种报错解决方案

qfish edited this page Sep 26, 2014 · 8 revisions

新建工程

  1. 新建工程推荐基于最新工程模板 Bee-Xcode-Template
  2. ARC问题请使用 xproj 解决

已有项目错误处理

首先保证 pch 里 有 #import "Bee.h"

更改编译选项

TargetBuild Setting里 搜索对应关键字,然后设置为对应的值。

Error Keyword Value
Confilcting types for echo CLANG_ENABLE_MODULES(Enable Modules) NO
direct accesses isa CLANG_WARN_DIRECT_OBJC_ISA_USAGE NO
msgSend ENABLE_STRICT_OBJC_MSGSEND NO
Return type GCC_WARN_ABOUT_RETURN_TYPE NO

更改代码

Error code Fixed
element.hash [element hash]
return nil return 0
controller = [rtti sharedInstance]; controller = (BeeMessageController *)[rtti sharedInstance];
model = [[self class] sharedInstance]; model = (BeeModel *)[[self class] sharedInstance];

如果有别的错误导致无法编译通过,请提Issues,尽量会在第一时间解决。

Clone this wiki locally