Skip to content

Sample iPhone app which finds tweets with positive or negative sentiments for topics which users enter manually or via iOS speech recognition. After this users can read these tweets or listen to them.

License

Notifications You must be signed in to change notification settings

IBM-Cloud/hear-the-buzz

Repository files navigation

Hear the Buzz

The hear-the-buzz project contains a sample iPhone app which finds tweets with positive or negative sentiments for topics which users enter manually or via iOS speech recognition. After this users can read these tweets or listen to them. On Apple Watches users can read the buzz.

Watch the video to see a demonstration of the app or have a look at the following screenshots.

alt text

alt text

Hear the Buzz Video

Technically IBM Bluemix is used to host the backend functionality for the app. The backend application is a Node.js application which provides some REST APIs. The app leverages the following Bluemix services.

I tested the app with iOS 9.0.1 and watchOS 2.0.

Setup

This application consists of two parts: A native iOS app (Xcode project) and the backend application and services running on Bluemix.

Setting up the Bluemix Backend Application and Services

The easiest way to set up the backend is to use the command line as documented below.

Sign up for Bluemix or use an existing account.

Download and install the Cloud Foundry Command Line Interface.

Download and install Node.js and npm.

Clone the app to your local environment from your terminal using the following command:

git clone https://github.com/IBM-Bluemix/hear-the-buzz.git

Change into the newly created directory, then go into the /server directory.

Invoke the following commands:

cf api https://api.ng.bluemix.net
cf login
cf create-service AdvancedMobileAccess Bronze hear-the-buzz-advanced-mobile-access
cf create-service twitterinsights Free hear-the-buzz-twitter-insights
cf create-service text_to_speech standard hear-the-buzz-text-to-speech
npm install
cf push

You now have your own instance up and running on Bluemix. The name of the application is "hear-the-buzz". You can find the URL in the command window, for example "hear-the-buzz-random-word.mybluemix.net".

Next you need to get the Route and App GUID. Go to your Bluemix Dashboard and then open your app's dashboard. From the app's dashboard, click on the link "Mobile Options" at the top.

alt text

The back end services are now ready to connect your mobile app.

Setting up the Mobile App

The native iOS app requires Xcode running on a Mac to compile and deploy on either the iOS Simulator or on a development device.

If you do not already have it, download and install CocoaPods.

In a terminal window, cd into the /client directory (from your local project directory).

Run the "pod install" command to setup the Xcode project and download all dependencies

pod install

This will create/update an Xcode Workspace file. Open the "hear-the-buzz.xcworkspace" file in Xcode.

Open the "Info.plist" file. You need to enter a bundle identifier and the Backend_Route, and Backend_GUID values from the steps above.

alt text

Note: If you want to use another bundle identifier than "com.ibm.test1" you need to change it in five different places.

hear-the-buzz/Info.plist:

Bundle identifier: com.ibm.test1

hearthebuzz WatchKit App/Info.plist:

Bundle identifier: com.ibm.test1.watchkitapp
WKCompanionAppBundleIdentifier: com.ibm.test1

hearthebuzz WatchKit Extension/Info.plist:

Bundle identifier: com.ibm.test1.watchkitextension
NSExtension/NSExtensionAttributes/WKAppBundleIdentifier: com.ibm.test1.watchkitapp

Now you are all set! Launch the app either on a device or in the iOS Simulator using Xcode.

About

Sample iPhone app which finds tweets with positive or negative sentiments for topics which users enter manually or via iOS speech recognition. After this users can read these tweets or listen to them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published