On iOS 9, 10 and 11 beta with Twitter Kit 3.0.4 if you initiate a login request when the Twitter app is installed, you will be redirected to the Twitter app for authentication. If the user is not logged into the Twitter app, they will be prompted to login. After logging in, the user is redirected back to the calling app. Sometimes (around 1 out of 5 attempts) after logging in on the Twitter app, Twitter does not redirect back to the calling app. This leaves the calling app in a bad state, waiting for the login completion to be called which never occurs.
Steps:
Pre req: Make sure Twitter app is installed (tested version 7.3.2), but no users are logged in
- Make call to Twitter.sharedInstance().logIn
- Tap open on the “AppName” wants to open “Twitter” dialog
- User is taken to the Twitter app where they are prompted to login
- After successfully logging in, the user is redirected back to the original app, where the login completion block is called. Sometimes however, that redirect does not occur, leaving the user in the Twitter app, and the calling app left waiting for a callback that never comes. If the redirect does correctly happen, go to the Twitter app, sign out, and try the steps again. You will get failures around 1 out of 5 attempts.
Sample app: https://www.dropbox.com/s/5c5538v7vyh2ewi/TwitterAuthTest.zip?dl=0
Video showing issue available on request, I didn’t want to post that publicly