We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Samnis
6 years agoExplorer | Level 4
Objective-C SDK crash
Hi,
in my project I am using the Objective-C SDK: I am updating the app to use scopes and short lived tokens. I added the SDK to the project by manually copying all the classes.
I am getting a really strange crash I have never seen before. The crash occurs when I try to connect my app to Dropbox. When my app is called back after the authorization flow it always crashes. For what I understand, the problem is within the method "+ (DBTransportDefaultConfig *)transportConfig" of the class "DBClientsManager". At runtime the returned instance is of a different type, and is not of the type "DBTransportDefaultConfig". So when you use it within the private method "db_addAuthorizedClientWithToken", the app crashes. With the debugger I can see the instance is of the right class ("DBTransportDefaultConfig") when it is saved with the method "+ (void)setTransportConfig:", so it is really strange. Also, if I run the app again (after the crash) it doesn't crash anymore and it is connected to Dropbox.
The crash occurs on Xcode 12.2 and 12.3, with iOS 14.2 and 14.3. I have updated all the classes to the latest version (commit 500).
Thank you and best regards,
Mario
13 Replies
Replies have been turned off for this discussion
- Samnis5 years agoExplorer | Level 4
Hi Greg,
please tell me if I am wrong.
I have updated the code of the app to use short-lived tokens, and I will release the update on the App Store in a few days.
But I haven't updated the app on the console of my Dropbox account. If so, users who update the app can connect it to Dropbox, or I need to updated the app on the console and set the "Access token expiration" to "Short-lived"? To recap, I would release the updated app on the App Store with the code using short-lived tokens, but without setting the "Access token expiration" to "Short-lived" on the console. There is something wrong about it? Or I need to set the "Access token expiration" to "Short-lived" before releasing the app update on the App Store? Is this mandatory?
Thank you very much,
Mario
- Greg-DB5 years ago
Dropbox Community Moderator
You are not required to change the "Access token expiration" setting for your app. If you do not change it, existing users on old versions of your app will continue using the old flow, and users on the updated version of the app will use the new flow. If you do not change it, nothing will change for old versions of your app until September 30th, 2021.
- Samnis5 years agoExplorer | Level 4
Ok, thank you very much Greg.
I'll leave the setting as is, and I only publish the new version of the app. This seems the best approach to me.
Thank you again,
Mario
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!