Upgrade to Twitter Kit 2.0ΒΆ

Note

It is important to note that Twitter Kit 2.0 supports iOS 8+. Please do not upgrade to Twitter Kit 2.0 if your project needs to be built for iOS versions less than 8.0.

Twitter Kit 2.0 includes a number of new and deprecated methods that must be taken into consideration when upgrading from 1.x. The sections below outlines these changes. A full list of changes can be viewed in the change log.

Requesting user email

  • [Removed] The TWTRShareEmailViewController class has been removed from Twitter Kit in version 2.0. If you still require access to the email address associated with the account you must use the web based OAuth login flow and request the email address via the verify_credentials endpoint, see Request User Email Address for more information. When the user is presented with the web based authentication flow they will be shown which permissions the application is requesting.

Removal of deprecated methods on Twitter instance

  • [Removed] Guest authentication methods were removed from the Twitter instance because the guest authentication logic is now automatically handled by Twitter Kit. If you still need to manage guest authentication on your own see Guest Authentication for more information.
  • [Removed] The -[Twitter logInWithExistingAuthToken:authTokenSecret:completion:] was removed from the Twitter instance. If you want to migrate existing OAuth tokens use the -[TWTRSessionStore saveSession:completion:] method instead.
  • [Removed] The APIClient property was removed from the Twitter instance. An APIClient can be instantiated directly without the need to use the shared instance. See Construct a Twitter API Client for more information.
  • [Removed] The logOut method and session property were removed from the Twitter instance, use the methods that are available on the TWTRSessionStore instead.

TWTRTweetView delegate methods

  • [New] Version 2.0 removed several delegate methods from the TWTRTweetViewDelegate protocol. Most of the methods that were removed were used for metrics related purposes and did not provide any mechanism for overriding functionality. These methods have been replaced in favor of NSNotifications which will allow developers to isolate their metrics logic from their controller logic.
  • [New] The notable exception to this is the removal of the -[TWTRTweetViewDelegate tweetView:didSelectTweet:] method. This method was replaced with -[TWTRTweetViewDelegate tweetView:shouldDisplayDetailViewController:] method which provides more value by allowing developers to customize the default implementation or provide their own behavior. If this method is not implemented a modal view controller will be presented when a Tweet view is tapped. If it is implemented developers can decide whether the detail view controller should be presented; if the delegate method returns YES the view controller will be presented but if NO is returned the view controller will not be presented and the developer can proceed however they want. For more information see Show Standalone Tweets in a Detailed View for more information.