保持Dropbox认证为将来时在内存中使用IOS - Keep Dropbox authentication in memory for futur use IOS

- 此内容更新于:2015-12-13
主题:

我创建了一个根在CydiaIOS应用程序。Dropbox集成是在我的应用程序中,一切都很好,链接,上传、下载等……我需要保持在内存中用户身份验证,因为每次我的程序关闭了,如果我需要做的一件事有关我需要重新编译应用Dropbox帐户。如果Dropbox的应用程序安装的问题是,我的申请成功的身份验证之后是Dropbox打开和关闭我的程序是开放的。因为关闭/重启动作,认证不是在数我的应用程序…如果Dropbox程序没有安装,一切都很好,因为一个UIWebView开了进我的应用程序,所以认证完成当我的应用程序是开放的在计数!我的问题是我怎样才能保持在内存中完成用户身份验证即使当我关闭应用程序?或者我怎么能迫使Dropbox认证在UIWebView而不是应用程序?提前感谢你的帮助!

原文:

I've created a root app for IOS in Cydia. Dropbox integration is in my application, everything is fine, link account, upload, download etc...

I need to keep in memory the user authentication because everytime my app is closed, if I need to do one thing related to Dropbox I need to relink my app to my Dropbox account. The issue is that if Dropbox application is installed, my application is closed for Dropbox opening and after successful authentication my app is reopened. Because of the close/reopen actions, the authentication is not taken in count by my app... If Dropbox application is not installed, everything is fine because an UIWebView is openned into my app, so the authentication is done when my app is open and it's taken in count !

So my question is how can I keep in memory the user authentication even if it's done when my app is closed ? Or alternatively how can I force the Dropbox authentication to be done in the UIWebView instead of the application ?

Thanks in advance for your help !

网友:我会尽量节省NSDictionaryNSUserDefaults与一个bool“isAuthenticated”键,另一个嵌套的字典值包含用户名和密码。

(原文:I would try saving an NSDictionary to NSUserDefaults with a bool "isAuthenticated" as the key and another nested dictionary as the value containing the user name and password.)

网友:(交联供参考:dropboxforum.com/hc/communities/public/questions/?]

(原文:[Cross-linking for reference: dropboxforum.com/hc/communities/public/questions/… ])