TwitterKit 3 authenticates users using the Twitter app if it’s installed, and then redirects back to our app. If Twitter is not installed, it performs the authentication using a web view. This causes problems when we have multiple apps installed that use the same API key/secret for Twitter auth (i.e. production and development apps). They all have the same callback URL scheme, and it’s undefined behavior which app iOS opens.
The Facebook login SDK works similarly, but they expose an
FBSDKLoginBehavior property on
FBSDKLoginManager that enables developers to force in-app authentication, which gets around this problem. Is there an equivalent feature available with TwitterKit? How would you go about solving this problem, assuming using a different API key/secret is not an option?