roller?
I am using the DropboxSDK for iOS, and I am trying to have a Dropbox fetch occur inside viewDidAppear(animated:). However, whenever I create a local DBRestClient inside viewDidAppear and call loadMetadata(forPath:), the delegate methods are never called. I am not presented with any errors or anything. It simply seems as though no requests were made. Being in viewDidAppear, the client should have been on the UI thread which has a run loop. I also tried explicitly asking GCD to run the declaration of the client as well as the loadMetadata call on the main thread but that did not work either.
In a desperate attempt to figure out what was wrong, I followed the tutorial to an absolute tee and the only difference was that the tutorial had the DBRestClient as an instance variable on the UIViewController. I thought there was no way that could actually be the problem. I pulled my DBRestClient variable out as an instance variable and sure enough everything worked suddenly.
My question is: why does the DBRestClient have to be an instance variable on a UIViewController?
Note: I am using Swift with an ObjC Bridging Header, but this should not have any affect on the actual workings of the code to my knowledge.