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:
- Create a typical iOS application in Swift.
- Install the Watson SDK for iOS.
- Create the Bluemix Watson service and get the key token to it.
- Add some code to invoke the cognitive service.
You can see the code the GUI for this lab is in GitHub: https://github.com/blumareks/Swift-Watson-Guis.
- You need the following software:
- Mac OS X El Capitan
- Xcode 7.3 or later
- Swift 2.2.x
- Carthage (package manager similar to Ant): https://github.com/Carthage/Carthage#installing-carthage
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):