Fabric: control session

I am trying to get a twitter session using this code:

[[Twitter sharedInstance] session]. 

I installed the Twitter kit using pod:

 pod 'Fabric' pod 'TwitterKit'. 

But when I run the application, the build fails: "Use of undeclared identifier Twitter". This is how I imported it #import <Twitter/Twitter.h>.

How to check if Twitter session is active from my objective-c application using Fabric?

Edit:

When I import these files and delete <Twitter/Twitter.h> :

 #import <Fabric/Fabric.h> #import <Crashlytics/Crashlytics.h> #import <TwitterKit/TwitterKit.h> 

This is what I get:

 no visible @interface for 'Twitter' declares the selector 'session' 
0
source share

Source: https://habr.com/ru/post/985734/


All Articles