jjzjj

TWTRSession

全部标签

ios - TWTRTwitter sessionStore 现在返回 TWTRAuthSession : so how does one access the userName property now?

使用Swift中的TwitterKit3.3.0sharedInstance().sessionStore.session()现在返回一个TWTRAuthSession而不是TWTRSession,因为前。事情发生了变化,这很好,但是thedocumentation尚未更新以反射(reflect)这一点,因此我不再知道如何访问以前的TWTRSession对象提供的userName属性。 最佳答案 你可以用perform(_:)来做到这一点希望下面的内容能帮助那些面临这个问题的人。letusername=session.perform