I am adding a feature to an existing iOS app which should allow the user to share an achievement via Twitter. The app has been installed onto two test devices, both signed into a Twitter account in Settings. The feature has the latest TwitterKit library (2.3.0) installed from Cocoapods; it also uses Crashlytics.
When the app tries to create a tweet, it tries to log in to Twitter, to create a TWTRSession. If successful, it creates and populates a TWTRComposer and displays it to the user. The user is able to edit the text and press post. The composer’s completion handler reports that the tweet was not cancelled, and logs out to end the session.
On the device which does not have Twitter installed, the tweet is successfully posted to the user’s timeline (checked on a different machine, naturally).
On the device which does have Twitter installed, the tweet is not posted. If the Twitter app is opened to check on the status of the tweet, an alert view is displayed, stating that there has been an error, and that the tweet has instead been saved to the Drafts folder.
Clearly there are other apps out there which are able to share tweets successfully even if the Twitter app is installed. However, I don’t know what steps I might have missed for my app. The TwitterKit documentation covers a lot of functionality, such as tweeting cards, viewing the user’s timeline, reading tweets etc., but does not make clear which installation steps or authorisation procedures are prerequisites for which functions, so I can’t tell which steps are necessary and which are irrelevant. During my search for a solution, I’ve found several stack overflow posts describing the same problem, but no-one has responded to them.
What should I do next?