Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Aibek D.'s avatar
Aibek D.
New member | Level 1
11 years ago

Dropbox iOS SDK: I had to manually add CoreGraphics to make it work

Hello.

I'm using Xcode 6.1.1. I have installed Dropbox SDK version 1.3.13 in my project and every time I tried to compile the project I was getting these errors:
1) DBRestClient.h
"Parse issue. Expected a type"
2) DBRestRequest.h
"Parse issue. Unknown type name 'CGFloat'."
Trouble is easily solved by importing CoreGraphics to DBRestClient.h
@import CoreGraphics;
or
#import <CoreGraphics/CoreGraphics.h>

It's a minor bug, but please fix it. In the corresponding example project "DBRoulette" everything is good, but when you try to manually add the framework to your project, aforementioned errors appear.

Thanks.

4 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    Thanks for the report! I can't seem to reproduce this by adding the iOS Core SDK 1.3.13 into a new iOS project made by Xcode 6.1.1 though, so there's likely something different about your project. It would be good to understand what the difference is. Are you able to reproduce this in a new iOS project?

  • Aibek D.'s avatar
    Aibek D.
    New member | Level 1
    11 years ago

    To Greg K.

    Hello, thanks for attention to the bug.
    I should mention that I lied about Xcode version, I have Xcode 6.1, not 6.1.1.
    I just created absolutely new project and tested it see if the bug is still there. Unfortunately, it is still there.
    You can download it from here: https://www.dropbox.com/s/onw848lcp8vkq07/testest.zip?dl=0

    By the way, I do this on virtual machine (OS X 10.9.5), maybe that's the problem.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    Thanks! That's very helpful. I believe I've tracked this down. We'll look into fixing this on our side in the SDK itself, but to quickly fix this in your project, change this:

    #import <DropboxSDK/DropboxSDK.h>
    
    #import "AppDelegate.h"
    

    to:

    #import "AppDelegate.h"
    
    #import <DropboxSDK/DropboxSDK.h>
    

    This is because the SDK needs UIKit imported, which is done by default in AppDelegate, but it will fail if you import DropboxSDK before AppDelegate.

  • Aibek D.'s avatar
    Aibek D.
    New member | Level 1
    11 years ago

    Hello, Greg!

    I'm glad that you've found the bug and solution.
    It's funny how sometimes everything goes wrong because one line is slightly above another one.
    Happy fixing!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!