Discussions
-
Objective-C Dropbox SDK warnings with iOS 12 as deployment target
After updating the Xcode deployment target in my iOS app to iOS 12, several warnings appeared in the Dropbox code. Updating through Cocoapods did not seem to change anything. The source files are all still dated 11-3-2020. I looked in the GitHub repository and the problematic code is still there. Here is one of them. In…
-
Updating a very old app to Java SDK 7.0.0
In preparation for the 2026 deadline on updating my Android app to the Dropbox 7.0.0 Java SDK, I changed the dependencies from the very old dropbox-core-sdk:3.1.5 to: implementation 'com.dropbox.core:dropbox-core-sdk:7.0.0' implementation 'com.dropbox.core:dropbox-android-sdk:7.0.0' Plus I added this, although I'm not sure…
-
Short-lived tokens: iOS vs Android
After having successfully migrated my app in both the Android and the iOS platform, I am curious about something. Why were the changes for Android so much more complicated than the changes for iOS? For Android, I had to handle persisting the string version of a new DbxCredential object and still create a new DbxCredential…
-
My migration plan for Android app (short-lived access tokens)
In looking at the various examples of implementing short-lived tokens in Andriod, I wanted my implementation to use more primitive methods, instead of DropboxClientFactory, PicassoClient, and DbxRequestConfigFactory. So here is what I have done, trying to pattern my code after the code in DropboxActivity, and adapting it…
-
Short lived token - Android user experience
What should the user experience be like for someone using my Android app after migration to short-lived access tokens? Currently we save a long-lived token in persistent storage for the app, so the user normally only authenticates once for the life of the app. It seems that the user authentication happens either in Dropbox…
-
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 fine when building for an iOS device, but fails when building for the simulator. I don't know how Cocoa Pods handled it. All I know…
-
Objective-C Dropbox API very different from v. 2.0.6 to 3.10.0
I had been using ObjectiveDropboxOfficial version 2.0.6 sinc 2016. Today I updated the SDK using cocoapods "pods update". All seemed to go well and it said I now have version 3.10.0. Initially I got "file not found" in my application file when I try to import the dropbox api header. I solved that by adding $(inherited) to…
-
iOS Exception: "Dropbox client already authorized"
While developing my code for using the new Objective-C SDK, I am running on the Xcode emulator. The first time I tried OAuth, it worked and brought up the Dropbox login web page. NSLog verified that the OAuth result was success. The second time I ran it there was an exception thrown saying "A Dropbox client is already…
-
OkHttp3Requestor.INSTANCE compile error after updating Java SDK to 3.0.3
This Android code was working fine with dropbox-core-sdk-2.1.1 but when I updated to dropbox-core-3.0.3, this code produced a compile error: DbxRequestConfig.Builder a = DbxRequestConfig.newBuilder("MyAppName"); DbxRequestConfig.Builder b = a.withHttpRequestor(OkHttp3Requestor.INSTANCE); DbxRequestConfig requestConfig =…
-
authorizeFromController problems with Covenent Eyes
I just heard from a user of my Objective-C app that when my app tries to link to Dropbox, nothing happens. I am using: [DropboxClientsManager authorizeFromController:[UIApplication sharedApplication] controller:self openURL:^(NSURL *url){ [[UIApplication sharedApplication] openURL:url]; } browserAuth:YES]; and this works…
-
Obj-C Dropbox Library crashes in iOS8.4
I just released my iOS app updated to Dropbox API v2 using the Obj-C library through CoCoPods. I works fine in iOS9. But now I am getting calls that it crashes on start-up under iOS8.x. Then I ran an iOS simulator with iOS 8.4 and it does indeed crash on start-up with dyld: Symbol not found: _NSURLSessionTaskPriorityHigh A…
-
Why Does Obj-C Library Code Recompile when building for release?
I noticed that when I make a change to my code and build for debug, only my code gets recompiled. But when I build for Distribution, either for the App Store or for Ad Hoc distribution, the entire 800+ files in the Offical Objective C Dropbox Library gets recompiled. It is not too much of a bother since I don't build for…
-
Getting File Metadata after doing upload - Android
To upload in Android I am using sDbxClient.files().uploadBuilder(pathName) .withMode(WriteMode.OVERWRITE) .uploadAndFinish(inputStream); which returns, what? The docs say it returns the server response as a "R". How do I extract the file metadata from the server response to uploadAndFinish? I want to get the server…
-
Creating a folder that already exists (iOS)
I went through this already for Android, and I learned that to create a folder that might already exists I only need to check the exception as follows: catch (CreateFolderErrorException err) { if( ! (err.errorValue.isPath() && err.errorValue.getPathValue().isConflict()) ) { /* a real error, to be handled */ } else {/*this…
-
Threads, tasks, and the Objective-C SDK
Having completed an Android version of my app, I was hoping that the Objective-C version for iOS would be similar. But looking at the DBRoulette example, there seems to be a big difference regarding threading. Is it correct that all the code shown in the four .m source files runs in the UI thread? This may be fine for…
-
Where is documentation for Obj-C API?
Where is the documentation for the API functions provided by the new Objective-C SDK? I mean for functions in the classes like DropboxClientsManager DBFILESListFolderResult DBFILESListFolderError DBFILESFileMetadata DropboxClient Is the only documentation the header files in the source code for ObjectiveDropboxOfficial?
-
iOS: Detect when DBError is "Invalid Access Token"
I need to determine when a DBError instance returned from listFolder: or downloadData: is because of an Invalid Access Token. So far I can see how to transform the DBError into a DBRequestAuthError using: [error asAuthError] provided [error isAuthError]. And I can see how to check for Invalid Access Token in an instance of…
-
Catching invalid access token exceptions
In the Android Core API v2 SDK, when a Dropbox access token becomes invalid, I want to catch that exception and null out my copy of the access token so the linking authorization will be done again. The trouble is, I don't know how to exactly qualify that particular exception. For testing purposes I have deliberately fed…
-
Creating a folder in Dropbox
Is there a sample of creating a folder in Dropbox from the Android Java SDK for Core API v2? The example of uploading files seems to deal only with the root folder. I have a background task that has an instance of DbxUserFilesRequests. I know that applying createFolder() to this instance will do it, but if the folder…
-
AccessToken Error recovery in Auth2 (Android)
In examining the Android sample for Core API v2, I was wondering how to properly handle error recovery in the use of AccessToken. In the example, the AccessToken is returned by Auth.getOAuth2Token(), and then stored in Shared Preferences for later use, so as to avoid going through the authentication process again. I assume…