2014-09-17 20 views
5

Tôi cập nhật máy Mac lên 1.9.4 và cài đặt Xcode 6, tôi đã tạo một dự án mới và sao chép UIBubbleTable nguồn từ dự án mà tôi đã sử dụng thư viện này trước đây và vẫn hoạt động tốt theo lần kiểm tra cuối cùng của tôi .lỗi xcode khi sử dụng thư viện cũ

Dự án cũ hoạt động tốt với thư viện này, nhưng dự án mới bị lỗi.

enter image description here

Tôi đã thêm mọi khung yêu cầu nhưng vẫn gặp lỗi.

Đây là nhật ký lỗi của tôi, vui lòng trợ giúp.

CompileC /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.o Troll\ Kitty/NSBubbleData.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler 
    cd "/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty" 
    export LANG=en_US.US-ASCII 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=7.1 -iquote /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-generated-files.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-own-target-headers.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-all-target-headers.hmap -iquote /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Troll\ Kitty-project-headers.hmap -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/DerivedSources/armv7 -I/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/DerivedSources -F/Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.d --serialize-diagnostics /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.dia -c /Users/vietnguyen/Desktop/Troll\ Kitty/Troll\ Kitty/Troll\ Kitty/NSBubbleData.m -o /Users/vietnguyen/Library/Developer/Xcode/DerivedData/Troll_Kitty-gggxclyccrfjrdfavpkgnqibgoth/Build/Intermediates/Troll\ Kitty.build/Debug-iphoneos/Troll\ Kitty.build/Objects-normal/armv7/NSBubbleData.o 

In file included from /Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:11: 
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:23:41: error: unknown type name 'UIView' 
@property (readonly, nonatomic, strong) UIView *view; 
             ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:23:1: error: property with 'retain (or strong)' attribute must be of object type 
@property (readonly, nonatomic, strong) UIView *view; 
^ 
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:24:33: error: unknown type name 'UIEdgeInsets' 
@property (readonly, nonatomic) UIEdgeInsets insets; 
           ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:25:31: error: unknown type name 'UIImage' 
@property (nonatomic, strong) UIImage *avatar; 
          ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:25:1: error: property with 'retain (or strong)' attribute must be of object type 
@property (nonatomic, strong) UIImage *avatar; 
^ 
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:27:31: error: unknown type name 'UIImageView' 
@property (nonatomic, strong) UIImageView *viewAvatar; 
          ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:27:1: error: property with 'retain (or strong)' attribute must be of object type 
@property (nonatomic, strong) UIImageView *viewAvatar; 
^ 
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:31:22: error: expected a type 
- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type; 
        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:32:22: error: expected a type 
+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type; 
        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:33:21: error: expected a type 
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 
        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:33:87: error: expected a type 
- (id)initWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 
                        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:34:21: error: expected a type 
+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 
        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.h:34:87: error: expected a type 
+ (id)dataWithView:(UIView *)view date:(NSDate *)date type:(NSBubbleType)type insets:(UIEdgeInsets)insets; 
                        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:46:7: error: unknown type name 'UIEdgeInsets' 
const UIEdgeInsets textInsetsMine = {5, 10, 11, 17}; 
    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:47:7: error: unknown type name 'UIEdgeInsets' 
const UIEdgeInsets textInsetsSomeone = {5, 15, 11, 10}; 
    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:102:7: error: unknown type name 'UIEdgeInsets' 
const UIEdgeInsets imageInsetsMine = {11, 13, 16, 22}; 
    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:103:7: error: unknown type name 'UIEdgeInsets' 
const UIEdgeInsets imageInsetsSomeone = {11, 18, 16, 14}; 
    ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:105:22: error: expected a type 
+ (id)dataWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type 
        ^
/Users/vietnguyen/Desktop/Troll Kitty/Troll Kitty/Troll Kitty/NSBubbleData.m:114:22: error: expected a type 
- (id)initWithImage:(UIImage *)image date:(NSDate *)date type:(NSBubbleType)type 
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=] 
20 errors generated. 

Trả lời

16

Dường như thư viện đó mong đợi tệp .pch nhập UIKit/UIKit.h (xem UIBubbleTableViewExample-Prefix.pch trong thư mục mẫu). Bạn có thể thêm một tệp pch tương tự vào dự án của bạn. Hoặc bạn có thể thêm thông tin sau vào các tệp tiêu đề mà bạn thấy các lỗi đó:

#import <UIKit/UIKit.h> 
+0

Cảm ơn bạn đã trợ giúp nhanh, trong xcode 5 nó sẽ tạo tệp này tự động, tại sao xcode 6 không làm điều đó? – vietnguyen09

+1

tôi đã thêm UIKit vào tệp lớp đang ném lỗi và vẫn gặp phải lỗi. –

Các vấn đề liên quan