I have an app with 3 targets ( dev, prod, staging ). Each target has his own app created on twitter dashboard and his own API Key and secret Key. I am using TwitterKit for iOS, in Swift. At app launch in Appdelegate the good keys/secrets and urlScheme are properly setup for Twitter in function of the running target. My tests shows that Twitter successfully register the good keys/secrets and urlScheme.
When I use the logIn() method, if the Twitter app is not installed on the device, everything works good since logIn() will present a modal Twitter WebView.
The issue is when the Twitter app is installed in the user’s device, calling logIn() with a target ( staging for example ) will work the first time showing the good app authorization infos via the Twitter app. If I use another target ( dev for example ) it will show the previous app authorization via the Twitter app. To make it work I must kill the Twitter app and relaunch it if I want to login via another target, then it will work and make the same issue.
So I guess there is a bug in the iOs Twitter app.