iOS Dropbox API: Import DropboxSDK/DropboxSDK.h in a .h file

223 Views Asked by At

Importing DropboxSDK in a .m file works perfect, but as soon as I try to import it in a header (so as to subclass it) I get a "Parse Issue: Expected a type" error for each .h file in DropboxSDK (DBRestClient, DBRequest etc)

.h file:

    #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) file

#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;
}
1

There are 1 best solutions below

0
On BEST ANSWER

Make sure you added Security.framework and QuartzCore.framework to your build phase for target you are using. Probably those are missing.