Create a Watson sentiment analysis app with Swift


This lab shows you how to build a mobile application that will analyze tone, or sentiment, in text. You’ll build the application in Swift and use the IBM Watson AlchemyAPI service to analyze sentiment conveyed in text.

    To create the application in this lab, follow these main steps:

  1. Create a typical iOS application in Swift.
  2. Install the Watson SDK for iOS.
  3. Create the Bluemix Watson service and get the key token to it.
  4. Add some code to invoke the cognitive service.

You can see the code the GUI for this lab is in GitHub:


Currently, the Watson Developer Cloud SDK for Swift requires a legacy version of Swift. Be sure to select the option to support Legacy Swift (Swift 2.3):