Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Mr_K
9 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...
- 9 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
9 years agoIf 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
9 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.149 years ago
Dropbox 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_K9 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.149 years ago
Dropbox 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_K9 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.149 years ago
Dropbox 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_K9 years agoExplorer | Level 3
Can you please share back the project that compiles?
- Stephen C.149 years ago
Dropbox 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_K9 years agoExplorer | Level 3
I am using Xcode 8.3.3 on macOS 10.12.5
- Stephen C.149 years ago
Dropbox 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_K9 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"}}
- Stephen C.149 years ago
Dropbox Staff
Can you try the steps here: https://stackoverflow.com/questions/30745675/cant-find-pods-modulemap-looking-in-wrong-directory
- Mr_K9 years agoExplorer | Level 3
No, this procedure and all other suggestions in that topic did not make missing file
/Pods/Target Support Files/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.modulemap
to appear. Making "pod install" command also does not create it.
Again I have "file not found" error concerning
#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
- Stephen C.149 years ago
Dropbox Staff
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.
- Mr_K9 years agoExplorer | Level 3
Thank you for your suggestion!
I will try.
About 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!