Twitterkit v3 trying to log with wrong app

ios
oauth

#1

I am on ios.
We are using multiple scheme, basically on dev scheme which use a dev part of a config file a info-dev.plist and a prod scheme using the prod part of the same config file and info.plist.

I confirmed that both consumer key and consumer secret are good for both schemes, config file and plist are properly loaded according to the scheme (we use multiple frameworks, facebook login is working properly).

I can log with the dev scheme but when i use the prod scheme which load prod values, the twitter app is trying to do a login with the dev app values.

I can confirm that the app is configured properly, after removing the twitter app from my ios testing device and revoking the access of my dev app from twitter webapp i can log in with my prod scheme using a webView.
So the problem is twitter related, seems like there is some caching mechanism done by twitter ios app.

Is there a way to fix this?

ps : twitterkit requires his scheme to be in first position otherwise the app will crash, a fix would be nice.


#2

I’m also seeing this exact problem. We have 2 schemes that reference different Twitter apps: staging & production. Twitter seems to be caching the environment. Even on the production scheme, OAuth is bringing up the staging app for authentication. The only fix for this was to delete the Twitter iOS app off my phone, reinstall it to clear its local cache.


#3

Same here, couldn’t find a workaround for this.