drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 132 forks source link

CDEDropboxCloudFileSystem.h unable to import "DropboxSDK.h" #247

Closed austin-bowen-advyon closed 7 years ago

austin-bowen-advyon commented 7 years ago

The title states the problem. Using Xcode 8.1, iOS deployment target 9.0. Here are my steps:

Steps I imported Ensembles and Ensembles/Dropbox into my existing project via cocoapods (v1.1.1), by adding these lines to my Podfile and installing:

pod 'Ensembles', '~> 1.6'
pod 'Ensembles/Dropbox', '~> 1.6'

This worked fine, and I was able to write code importing and using both the Ensemble framework and the CDEDropboxCloudFileSystem files. However, on (cleaning and then) building the project, Xcode gives me build error "'DropboxSDK.h' file not found" in the CDEDropboxCloudFileSystem.h file.

I noticed that in your Idiomatic app example code, the IDMSyncManager.h file used #import <DropboxSDK/DropboxSDK.h> rather than #import "DropboxSDK.h" as found in the CDEDropboxCloudFileSystem.h file. So, I tried changing the #import "DropboxSDK.h" statement in the CDEDropboxCloudFileSystem.h file to #import <DropboxSDK/DropboxSDK.h> as found in the IDMSyncManager.h file. However, it still failed to import/build.

Workaround Finally, I removed the 'Ensembles/Dropbox' dependency from the Podfile, added the dependency pod 'Dropbox-iOS-SDK', '~>1.3.13', installed (and verified that the Ensembles/Dropbox files had been removed), copied the CDEDropboxCloudFileSystem.h/m source files directly into my project, and again changed the #import "DropboxSDK.h" statement in the CDEDropboxCloudFileSystem.h file to #import <DropboxSDK/DropboxSDK.h>. FINALLY, the project was able to compile.

I'm hoping you can point out what the issue is. I'm sure it's something simple, but I don't know enough about pods, frameworks, etc. to figure it out myself. The workaround is simple enough, but it would be much nicer to just be able to use "pod 'Ensembles/Dropbox' ..." and be done with it.

Thanks so much for the work you've done in this project, it's sure making my life a TON easier :)

drewmccormack commented 7 years ago

I think you can probably add a path to the DropboxSDK file in the build settings in User Search Paths. Idiomatic might have that too.

Kind regards, Drew

On 9 Nov 2016, at 16:42, Austin Bowen notifications@github.com wrote:

The title states the problem. Here are my steps:

Steps I imported Ensembles and Ensembles/Dropbox into my existing project via cocoapods (v1.1.1), by adding these lines to my Podfile and installing:

pod 'Ensembles', '~> 1.6' pod 'Ensembles/Dropbox', '~> 1.6' This worked fine, and I was able to write code importing and using both the Ensemble framework and the CDEDropboxCloudFileSystem files. However, on (cleaning and then) building the project, Xcode gives me build error "'DropboxSDK.h' file not found" in the CDEDropboxCloudFileSystem.h file.

I noticed that in your Idiomatic app example code, the IDMSyncManager.h file used #import <DropboxSDK/DropboxSDK.h> rather than #import "DropboxSDK.h" as found in the CDEDropboxCloudFileSystem.h file. So, I tried changing the #import "DropboxSDK.h" statement in the CDEDropboxCloudFileSystem.h file to #import <DropboxSDK/DropboxSDK.h> as found in the IDMSyncManager.h file. However, it still failed to import/build.

Workaround Finally, I removed the 'Ensembles/Dropbox' dependency from the Podfile, added the dependency pod 'Dropbox-iOS-SDK', '~>1.3.13', installed (and verified that the Ensembles/Dropbox files had been removed), copied the CDEDropboxCloudFileSystem.h/m source files directly into my project, and again changed the #import "DropboxSDK.h" statement in the CDEDropboxCloudFileSystem.h file to #import <DropboxSDK/DropboxSDK.h>. FINALLY, the project was able to compile.

I'm hoping you can point out what the issue is. I'm sure it's something simple, but I don't know enough about pods, frameworks, etc. to figure it out myself. The workaround is simple enough, but it would be much nicer to just be able to use "pod 'Ensembles/Dropbox' ..." and be done with it.

Thanks so much for the work you've done in this project, it's sure making my life a TON easier :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

austin-bowen-advyon commented 7 years ago

I tried adding the line "$(SRCROOT)/Pods/Dropbox-iOS-SDK/" (recursive) to the User Header Search Paths in my project, both in the main project file and in the Pods project file, and toggled the Always Search User Paths in both, and tried replacing #import "DropboxSDK.h" with #import <DropboxSDK/DropboxSDK.h>, cleaning and building along the way, but always the same error: '[DropboxSDK/]DropboxSDK.h' file not found.

austin-bowen-advyon commented 7 years ago

I also tried extending the path all the way down to the DropboxSDK.h file, but that didn't work either.

austin-bowen-advyon commented 7 years ago

Sorry, I forgot to mention: Before doing the things in the previous two comments, I removed the CDEDropboxCloudFileSystem.h/m files I had explicitly added to the project, then added back the pod entry for Ensembles/Dropbox, and installed. So I was basically starting with only the Ensembles and Ensembles/Dropbox pods installed (and the implied Dropbox-iOS-SDK pod), so no work-around funny business going on.

drewmccormack commented 7 years ago

Very odd.

I'm afraid I am not really expert on pods either. I never use it myself.

But it is weird that it is not finding the header even with the search path. Seems like Xcode messing up.

Kind regards, Drew

On 9 Nov 2016, at 17:47, Austin Bowen notifications@github.com wrote:

Sorry, I forgot to mention: Before doing the things in the previous two comments, I removed the CDEDropboxCloudFileSystem.h/m files I had explicitly added to the project, then added back the pod entry for Ensembles/Dropbox, and installed. So I was basically starting with only the Ensembles and Ensembles/Dropbox pods installed (and the implied Dropbox-iOS-SDK pod), so no work-around funny business going on.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.