We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Jon B.1
4 years agoCollaborator | Level 9
Short-lived token migration in Swift producing nil Client
I'm migrating an old Swift app to SwiftyDropbox 6.0.3 and short-lived tokens with refresh; our app needs offline access. But with the code changes, I'm getting odd behaviour -- the completion handle...
- 4 years ago
I think I've resolved it -- I'm still not sure why it was interfering with that URL scheme in the main program, but that may be down to the Group Container settings which lump the app and the Finder Sync extension together for communication purposes!
The source of the problem was that the Finder Sync extension was trying to connect to the socket on *its* main thread, and taking a full minute to fail. By moving the connection attempt off of the main DispatchQueue onto a low-priority one, the problem with Dropbox not being able to get through to the main program vanished.
Strange, but hey, if it works...!
Jon B.1
4 years agoCollaborator | Level 9
Update on this: turns out the completion handler *was* running consistently, it just took about two minutes to do so, and so other things were timing out as a result! It looks like something is sitting on the main thread in my app, which was blocking the completion handler from running. I'm still investigating.
Basically, there were more changes than I thought between my old SwiftyDropbox version and 6.0.3. Rather than having the logic continue in the original thread, I've now refactored so that the code which checks the client status and proceeds to my own completion handler is only executed at the end of the handleRedirectURL completion handler.
But even after these changes, it's still taking about 45 seconds for the handleRedirectURL completion handler to run. Is there anything I need to know about how 6.0.3 deals with the main queue, which could explain the blocking? Or is this a problem with the rest of my app?
- Greg-DB4 years agoDropbox Staff
Thanks for following up. I'm not aware of anything with the SwiftyDropbox SDK itself that would cause that. In my test, for instance, the entire completion handler runs pretty much instantaneously.
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!