在.m文件中导入DropboxSDK工作得很完美,但是一旦我尝试在头文件中导入它(以便将其子类化),我就会得到每个.h文件的“解析问题:预期类型”错误DropboxSDK(DBRestClient,DBRequest等)
.h文件:
#ifndef Photo_Voithos_Voithos_h
#define Photo_Voithos_Voithos_h
#endif
#import <Foundation/Foundation.h>
#import <DropboxSDK/DropboxSDK.h>
@interface Voithos : NSObject
@property NSDate *date;
.m(ViewController)文件
#import "ViewController.h"
#import <DropboxSDK/DropboxSDK.h>
#import "Voithos.h"
@interface ViewController () <DBRestClientDelegate>
@property (nonatomic, strong) DBRestClient *restClient;
@property (nonatomic, strong) Voithos *voithos;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)initiateDropbox {
self.restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
self.restClient.delegate = self;
}
答案 0 :(得分:0)
确保已将Security.framework
和QuartzCore.framework
添加到您正在使用的目标的构建阶段。可能那些都不见了。