We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Nick A.23
10 years agoNew member | Level 1
In the DropboxSDK for iOS, are DBRestClients required to be an instance variable of a UIViewController?
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 loadMet...
Steve M.
Dropbox Staff
10 years agoYour DBRestClient instance presumably went out of scope at the end of viewWillDisappear, so the object got deleted. Although you don't necessarily need it to be an instance variable on a UIViewController, it does need to be retained somehow.
I should point out that the API you're using has been deprecated and will stop working next year. See https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/ for details.
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!