You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Mr_K
8 years agoExplorer | Level 3
Problems when migrating from API v1 to v2
When migrating my Objective C project for iOS from Dropbox API v1 to v2 I am changing my source code, replacing old #import <DropboxSDK/DropboxSDK.h> to new #import <ObjectiveDropboxOfficial/O...
- 8 years ago
Then I would recommend using Carthage, rather than CocoaPods, as it is less invasive. You can build the binaries with Carthage and then drage and drop them into each of your targets.
This approach will work better, I think.
Stephen C.14
Dropbox Staff
If you uncomment `target 'SB' do` in your Podfile, and then you run `pod install`, even with the CocoaPods errors, the .xcworkspace file builds for me for target `SB`.
Can you confirm this?
Mr_K
8 years agoExplorer | Level 3
This Podfile:
target 'BASIC' do
use_frameworks!
pod 'ObjectiveDropboxOfficial'
end
target 'SB' do
end
And this podfile:
target 'BASIC' do
use_frameworks!
pod 'ObjectiveDropboxOfficial'
end
target 'SB' do
use_frameworks!
pod 'ObjectiveDropboxOfficial'
end
Both give the same pod install output:
Analyzing dependencies
[!] Unable to find host target(s) for SB. Please add the host targets for the embedded targets to the Podfile.
Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:
- Framework
- App Extension
- Watch OS 1 Extension
- Messages Extension (except when used with a Messages Application)
And give these two Xcode compilation errors:
/Users/kibernetik/Мои программы/BASIC copy/SB/ViewController.h:7:9: 'ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h' file not found
Error: unable to read module map contents from 'Target Support Files/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file “ObjectiveDropboxOfficial.modulemap” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/kibernetik/Мои программы/BASIC copy/Pods/Target Support Files/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.modulemap, NSUnderlyingError=0x7fd04bcfb3b0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Of course Xcode was reloaded each time.
- Stephen C.148 years agoDropbox Staff
In your Podfile, please delete `use_frameworks!` for target `'SB'` only. Then things should work.
(it doesn't really make sense to link a framework to a library).
- Mr_K8 years agoExplorer | Level 3
I also have tried this variant. When my Podfile is:
platform :ios, '9.0'
target 'BASIC' do
use_frameworks!
pod 'ObjectiveDropboxOfficial'
end
target 'SB' do
pod 'ObjectiveDropboxOfficial'
endI get the same pod install warning and the same two errors.
Actually I get 'file no found' error even prior to compiling: Xcode editor immediately marks this code line as erroneous just after the project is loaded.
- Stephen C.148 years agoDropbox Staff
I still get the pod warnings as well, but everything builds correctly for me.
Please ensure that you close Xcode before calling `pod install` and that you open the `.xcworkspace` file and not the `.xcodeproj` file.
Please also do a full a rebuild (cmd+option+shift+k) after `pod install`.
If you have done all of these things, then please repost your updated project here, as I am not seeing the same issues that you are.
- Mr_K8 years agoExplorer | Level 3
All issues are the same.
This is the latest version of test project: https://yadi.sk/d/6W373tQ23K8Uyg
Thank you!
- Stephen C.148 years agoDropbox Staff
This project builds fine for me after running `pod install` and opening the `.xcworkspace` file.
Please ensure that you have Xcode Version 8.3.3+ installed.
- Mr_K8 years agoExplorer | Level 3
Can you please share back the project that compiles?
- Stephen C.148 years agoDropbox Staff
Same project as the one you just uploaded (the second one).
Which version of Xcode are you using? Please download the latest one, otherwise things might not compile.
- Mr_K8 years agoExplorer | Level 3
I am using Xcode 8.3.3 on macOS 10.12.5
- Stephen C.148 years agoDropbox Staff
Strange. So am I. When I run `pod install` on the project you uploaded, and open the `xcworkspace` file, and build, it builds successfully.
What's your output for `pod --version`?
Mine is:
```
scobbe-mbp:server scobbe$ pod --version
1.2.0.beta.1```
- Mr_K8 years agoExplorer | Level 3
My pod version is 1.2.1
It seems that
#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
now raises no error, but when I compile that test project I get this error:
Error: unable to read module map contents from 'Target Support Files/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file “ObjectiveDropboxOfficial.modulemap” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/kibernetik/Downloads/BASICcopy/Pods/Target Support Files/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.modulemap, NSUnderlyingError=0x7fa1f005d630 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days agoIf 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 or Facebook.
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!