Twitter Kit iOS purges all sessions every time the app is launched

ios

#1

Every time that app starts and calls didFinishLaunchingWithOptions to start Twitter Kit with the consumer key and consumer secret, it prints a message on the console saying that it purged all sessions. Here’s the message:

The application’s consumer key or consumer secret has changed since the last launch. Any saved user sessions will be purged from the system because they will no longer work with the current key and secret. User’s will need to log in again

I’m using the Twitter Kit iOS in Swift, and call this method at the beginning of the didFinishLaunchingWithOptions:

TWTRTwitter.sharedInstance().start(
    withConsumerKey: consumerKey,
    consumerSecret: consumerSecret
)

Right after this is called the message that I mentioned before is shown.

Any idea why this is happening?


#2

Some more information about the issue; this is only happening if I use TwitterKit via Carthage. Just tried it when using CocoaPods and it worked as expected.

Hope it helps to get this issue fixed.