Search code examples
iosswiftxcodetwitterxcode9-beta

How to access Twitter in Xcode 9 Simulator when Apple remove it from Settings?


I'm trying to learn Swift on iOS 10 + Swift 3 Course of Stanford. But I'm coding with Xcode 9 - iOS 11 - Swift 4. When I want to access Twitter to fetch the data from the Twitter framework, there is an error:

"TwitterRequest: Access to Twitter was not granted."

We can fix this bug, by the way, is going to Settings and Sign in Twitter but in iOS 11, Apple has removed it from Settings I do not how to access Twitter, please help me.
Thank you so much!


Solution

  • iOS 11 no longer supports using Twitter through the built-in social framework. Instead, you can use Twitter Kit 3 to Tweet, log in users, and use the Twitter API.

    Take a look at this guide. But overall it got more complicated to accomplish Twitter login and if you are just getting started with iOS development I'd recommend skipping this step if possible.