Using TwitterKit from framework


I am using TwitterKit within an app. I wrote a UI piece based on the TwitterKit UITableViewController subclass and all was working fine. I then moved this code to a framework within the app - have it all linking fine - but on run am now getting:

[TwitterKit] initWithSessionStore:userID: Invalid parameter not satisfying: sessionStore

Any idea on the issue - is there some problem since the code is running in a different bundle than the main app bundle now?



Hey @mwoollard,

Just a quick question - is that throwing an error for you or just a warning and is it impacting your app?



Just a warning in console but app doesn’t display any feed data. However I did today resolve this, its down to the fact that the Fabric/Twitter ‘frameworks’ are really framework wrappers around a static lib. I had to move all code into my framework and only link / run here. Then it works. I think before when I had initialisation in app bundle and utilisation in framework due to two copies being statically linked into each of these things don’t work - assume there are duplicate singletons in existence etc.

Are there plans to make the SDK frameworks true frameworks? I assume they are not currently to support iOS 7? Maybe with iOS 10 due within a month iOS 8 can become the base supported OS revision and move to true frameworks?



Gotcha, thanks for letting me know you’re all set now @mwoollard. We have improvements planned with our frameworks, but it’s good to know you’d love to see them as well :slight_smile: