Deprecated? Twitter.sharedInstance().application(app, openURL:url, options: options)

login

#1

Hi, I’m following the Fabric iOS Advanced setup but can find no reference in code or any apis to:

Twitter.sharedInstance().application(app, openURL:url, options: options)

Application simply does not seem to be a property of Twitter any more. Has this been deprecated?

https://docs.fabric.io/apple/twitter/advanced-setup.html#notify-twitter-kit-of-openurl


#2

Weird, it should be defined in Twitter.h according to the Appledocs - not sure if anything changed in that class recently. What version of Twitter Kit are you using?


#3

Fabric says 2.1.1.

I’m looking at Twitter.h in Xcode now and I can’t see any reference to it.

I’ve got:

  • (Twitter *)sharedInstance;
  • (void)startWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret;
  • (void)startWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret accessGroup:(nullable NSString *)accessGroup;
    @property (nonatomic, copy, readonly) NSString *version;
    @property (nonatomic, readonly) TWTRAuthConfig *authConfig;
    @property (nonatomic, readonly) TWTRSessionStore *sessionStore;
  • (void)logInWithCompletion:(TWTRLogInCompletion)completion;
  • (void)logInWithMethods:(TWTRLoginMethod)methods completion:(TWTRLogInCompletion)completion;
  • (void)logInWithViewController:(nullable UIViewController *)viewController completion:(TWTRLogInCompletion)completion;
  • (void)logInWithViewController:(nullable UIViewController *)viewController methods:(TWTRLoginMethod)methods completion:(TWTRLogInCompletion)completion;

No mention of OpenUrl or Application


#4

Yeah, same - and I can’t see a reference to it in the changelog. Digging and will get back to you.


#5

No I’m mistaken. It is there in Twitter.h at line 168.


#6

My version of Twitter.h only has 145 lines? This is from the version of the Framework I just downloaded from Fabric.


#7

Apparently this was added as of version 2.2.0 which I’m not using yet. Hopefully there are no adverse affects from me not upgrading yet. All seems to be working fine without at the moment.


#8

Aha! Sorry, I should have stated that I’m on a later version, I missed that. One big change in 2.2.0 is that the images are bigger/better, and the user auth flow is different - see https://blog.twitter.com/2016/slicker-user-authentication-with-twitter-kit-22 and https://fabric.io/blog/fabric-march-update for more on those.