关于ios应用引入AFNetworking后编译报错的问题

骑毛驴的王子 发布于 2015/11/09 22:00
阅读 1K+
收藏 0

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:29:1: error: unknown type name 'NS_ASSUME_NONNULL_BEGIN'

NS_ASSUME_NONNULL_BEGIN

^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:36:1: error: cannot combine with previous '(error)' declaration specifier

@protocol AFURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>

^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:47:4: error: expected a type

- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request

   ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:48:48: error: expected a type

                               withParameters:(nullable id)parameters

                                               ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:49:58: error: expected ')'

                                        error:(NSError * __nullable __autoreleasing *)error NS_SWIFT_NOTHROW;

                                                         ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:49:47: note: to match this '('

                                        error:(NSError * __nullable __autoreleasing *)error NS_SWIFT_NOTHROW;

                                              ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:49:109: error: expected ':'

                                        error:(NSError * __nullable __autoreleasing *)error NS_SWIFT_NOTHROW;

                                                                                                            ^

                                                                                                            :

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:143:19: error: expected a type

- (void)setValue:(nullable NSString *)value

                  ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:153:4: error: expected a type

- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;

   ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:198:47: error: expected a type

- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;

                                              ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:225:45: error: expected a type

                                parameters:(nullable id)parameters

                                            ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:226:55: error: expected ')'

                                     error:(NSError * __nullable __autoreleasing *)error;

                                                      ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:226:44: note: to match this '('

                                     error:(NSError * __nullable __autoreleasing *)error;

                                           ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:251:58: error: expected a type

                                             parameters:(nullable NSDictionary *)parameters

                                                         ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:252:58: error: expected a type

                              constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block

                                                         ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:253:68: error: expected ')'

                                                  error:(NSError * __nullable __autoreleasing *)error;

                                                                   ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:253:57: note: to match this '('

                                                  error:(NSError * __nullable __autoreleasing *)error;

                                                        ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:268:59: error: expected a type

                                       completionHandler:(nullable void (^)(NSError * __nullable error))handler;

                                                          ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:292:42: error: expected ')'

                        error:(NSError * __nullable __autoreleasing *)error;

                                         ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:292:31: note: to match this '('

                        error:(NSError * __nullable __autoreleasing *)error;

                              ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:309:42: error: expected ')'

                        error:(NSError * __nullable __autoreleasing *)error;

                                         ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:309:31: note: to match this '('

                        error:(NSError * __nullable __autoreleasing *)error;

                              ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:320:36: error: expected a type

- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream

                                   ^

/Users/rzz/Desktop/iphone-app/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h:356:32: error: expected a type

- (void)appendPartWithHeaders:(nullable NSDictionary *)headers


而且我afnetwoking用的是最新的版本,用cocoapod下载的?一直搞不懂怎么会报这种错误

加载中
返回顶部
顶部