开发者

Encountering One-off Issue Integrating Dropbox SDK?

I have downloaded the Dropbox API for Objective-C/iOS devices, and I am able to successfully build and run the DBRoulette application.

When I foll开发者_JS百科ow the README directions for including the API in my project, I have an enormous number of build errors, all appearing to be related to missing the Foundation header. (Eg. Can't find the interface declaration for NSObject, NSString, etc.)

Many of their header files don't include any other headers at all. Don't all .h files need to import Foundation.h if they extend NSObject? This doesn't seem to be the case, as the example project (DBRoulette) builds and runs fine without the Foundation header declarations, but my own application fails miserably.

I must be missing some sort of project setting, but I can't determine what it is.

  • Screenshot of One Failing Class


In their example app, they have

#ifdef __OBJC__
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
#endif

in their prefix header file (DBRoulette_Prefix.pch). This file is automatically prefixed to all source files in the project, so the appropriate headers are found. You can either put the #import directives in the source files themselves, or do what they did and edit the .pch file for your project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜