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;
}
Make sure you added
Security.framework
andQuartzCore.framework
to your build phase for target you are using. Probably those are missing.