We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Robert S.138
5 years agoHelpful | Level 7
Can't build for iOS Simulator when SDK installed with Carthage
Apple broke my Dropbox SDK installation in their latest XCODE 12.0.1. I was using the Cocoa Pods method ever since Dropbox V2 came out. So I decided to redo my project using Carthage. It works fin...
- 5 years ago
**SOLVED**
The main problem was that the Intel 64-bit architecture was not recognized by XCODE as on of the build architectures. That in turn was caused by the update to XCODE 12. Even though the architectures were properly indicated as $(ARCHS_STANDARD) in both the project and the target build settings, they were being overriden by a setting in the USER-DEFINED section of the build settings that XCODE transferred there for some reason. The setting in USER-DEFINED was
VALID_ARCHS armv7 arm64
The solution was to click on this setting and hit DELETE so it totally vanishes. Then the main project build settings that include all standard architectures can be effective. It was odd that this error led to the error "ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h" not found. But perhaps it had to do with CocoaPods making a copy of the header files for each architecture, because this error did not happen when building for a real device. Anyway, it is solved.
Oh, I gave up on Carthage and returned to my original Cocoapods setup. Also I updated Cocoapods to the latest, version 1.10.0 with
sudo gem install cocoapods
Also I updated the ObjectiveDropboxOfficial project to ver 5.0.3 with:
pod update
pod deintegrate
pod install
(I don't know if the last two commands were necessary.)
Updating to Dropbox API version 5.0.3 and XCODE 12 only required two small accomodations in my source code. One was that the type of the first parameter in the response block for the function createFolderV2 had to be changed from DBFILESFolderMetadata to DBFILESCreateFolderResult. The other change was that [DBClientsManager handleRedirectURL] now uses a completion block instead of returning the DBOAuthResult directly.
Anyway, I am back to using Cocoapods and everything is working as it should.
Greg-DB
Dropbox Staff
Thanks for the report! We'll look into this to see what the issue may be.
To make sure we reproduce the same problem you're seeing though, can you share the relevant error messages you're getting? Thanks in advance!
Greg-DB
5 years agoDropbox Staff
It looks like these issues are due to incompatibilies with Xcode 12 in both Cocoapods and Carthage.
For Cocoapods, please refer to this issue: https://github.com/CocoaPods/CocoaPods/issues/9902
For Carthage, please refer to this issue: https://github.com/Carthage/Carthage/issues/3019
- Robert S.1385 years agoHelpful | Level 7
Here is the latest minimal failure example:
Start XCODE 12.0.1: Select "New Project". Select "App". Project Name: "TuneLab3" Create.
This skeleton program builds OK. Now to manually add Dropbox as a subproject (which also involves Carthage).
Create Cartfile in project root with the following contents:
# ObjectiveDropboxOfficial
github "https://github.com/dropbox/dropbox-sdk-obj-c" ~> 5.0.3
Open a terminal window, navigate to the project root, and do:
carthage update --platform iOS
And this is the output:
*** Fetching dropbox-sdk-obj-c
*** Checking out dropbox-sdk-obj-c at "5.0.3"
*** xcodebuild output can be found in /var/folders/mh/0wpmn3f15r18xmqnrgtyzrgm0000gn/T/carthage-xcodebuild.YEPV7A.log
*** Building scheme "ObjectiveDropboxOfficial iOS" in ObjectiveDropboxOfficial.xcodeproj
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/robertscott/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0.1_12A7300/dropbox-sdk-obj-c/5.0.3/Build/Intermediates.noindex/ArchiveIntermediates/ObjectiveDropboxOfficial\ iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial /Users/robertscott/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0.1_12A7300/dropbox-sdk-obj-c/5.0.3/Build/Products/Release-iphonesimulator/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial -output /Users/robertscott/Documents/iOSdev/TuneLab3/Carthage/Build/iOS/ObjectiveDropboxOfficial.framework/ObjectiveDropboxOfficial
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/mh/0wpmn3f15r18xmqnrgtyzrgm0000gn/T/carthage-xcodebuild.YEPV7A.log
But when I look at the log file cited, it is an 8 MB file that ends with:
** BUILD SUCCEEDED **
Should I just trust that everything is OK?
- Greg-DB5 years agoDropbox Staff
Thanks for following up. It looks like this is due to that Carthage issue. We can't officially offer support for Carthage itself as that's not made by Dropbox though, so I'll have to defer to the information in the Carthage issue regarding this. It looks like that's currently still open.
For reference though, one way to check the version of the Dropbox Objective-SDK that is loaded in a project is to check the value of `kDBSDKVersion` in code, which is a constant containing the Dropbox Objective-SDK version number.
- Robert S.1385 years agoHelpful | Level 7
Is there a way to add the Dropbox SDK to an XCODE project that does not involve any 3rd party software like Carthage or CocoaPods just by copying source code directly? Even though the problem I need to debug in iOS 14 has nothing to do with Dropbox, if I can't even build my app for iOS 14 I can't do any debugging on that issue and I can't build for iOS 14 without XCODE 12.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months 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!