SLServiceTypeTwitter' is deprecated: first deprecated in iOS 11.0

Hi guys,

I am using XCode 9.3 and when going through the 1st week of Networking and Security course, when trying to use SLServiceTypeTwitter, SLServiceTypeFaebook or any other social media ones, I get an error saying that they are depricated since iOS 11.0.

So what is the solution here?

Also, they don’t include Twitter, FB and all the social media apps in the simulators as well…

Thank you,
Mircea

PS: I just saw other people had this problem, so I guess I will download an old simulator that is running an older version, but I still think these courses should be updated and the code should work with the latest OS versions. Thanks!

1 Like

Right, I worked around this by setting the project deployment target to iOS version 10.3.

2 Likes

That’s correct, the single sign on support for Social Media appears to be all gone in favor of sharing via the social media’s applications.

1 Like

I did all the above steps but each time when I run the codes it brings up the simulator withe latest iOS version (i.e. no Twitter login option). I’ve been searching everywhere on how to set a default iOS version for the simulator that pops up but no success so far - can anyone help?

You can load older ios versions in Xcode preferences


After you do that, then you can pick the iOS in the simulator

1 Like

Thank you professor. I have followed the above steps exactly (as well as set back the deployment target in Xcode’s right panel to ‘iOS 10.3 or later’. The hurdle I’m facing is that the earlier iOS simulator, once selected as per your step 2 above, does not show the TwitterShare app - specifically, the TwitterShare app only comes out in the simulator that appears automatically when I run the code & that always defaults to 11.4. Thanks again

Xcode should show you options to run your app on devices with specific ios’s installed


If they aren’t there, make sure you are compiling to the right target and you have added the simulators as per the screen shot above

1 Like

Thank you very much Professor! It has finally worked for me (I just don’t know how I simply couldn’t get it to work all those times before). I will haste to catch up on the assignment (which I am unfortunately almost a week late). Thank you very much indeed.

Thanks a lot for the help, I was getting really stuck here. I just wanted to make sure that even after I follow the steps Xcode will still show the error sign, even though the app works well on the simulator.
Thanks

I am running xcode 11.4. I am unable to add the 10.3.1 simulator.
I followed the above instructions. I am abbe to add any simulator after ios11.0 But noting earlier.

Is it OK to use Facebooks API and Twitter API (FBSDK and Twitter Kit) to complete this assignment? I feel like using deprecated frameworks and switching to 10.3 target SDK is a bit pointless…