Swift Dropbox quick tip
Quick Tip
If you’re going to use the Dropbox API in your Swift app, you will need a bridging header. If you don’t have one, just create a dummy Objective-C class and you will be prompted to have one created for you. Then delete the dummy class.
Then add DropboxSDK.h to the bridging header.
Blammo. Syntax errors in the framework. Doesn’t know things like NSCoding.
The current headers have this all over the place: #ifdef __OBJC__
Well, we’re not in Objective-C anymore Toto.
So, add a few more imports like this to the bridging header:
1 2 3 |
#import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <DropboxSDK/DropboxSDK.h> |