cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

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

New member | Level 1
New member | Level 1

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 4
Highlighted

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

Dropboxer
Dropboxer

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?

Highlighted

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

New member | Level 1
New member | Level 1

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.

Highlighted

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

Dropboxer
Dropboxer

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.

Highlighted

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

New member | Level 1
New member | Level 1

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!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?