Home

Awesome

Tapster iOS Demo

Build Status

This demo demonstrates how to use the PredictionIO Swift SDK to integrate an iOS app with a PredictionIO engine to make your mobile app more interesting.

Requirements

Demo

thumbnail

Quick Setup

Set up the PredictionIO Engine

$ git clone https://github.com/minhtule/Tapster-iOS-Demo-Similar-Product-Engine.git tapster-similar-product
# Need to start HBase and Elasticsearch first
$ pio-start-all
$ pio app new tapster
$ cd tapster-similar-product
$ pio build

Note: If your PredictionIO app is not tapster, you need to update the appName field in the engine.json file with the new app name.

Set up the iOS app

bundle install
$ cd ..
# Clone this iOS repo if you haven't done so
$ git clone https://github.com/minhtule/Tapster-iOS-Demo
# Switch to the Xcode project directory
$ cd Tapster-iOS-Demo
$ pod install

Import data and train the engine

# Switch back to the engine directory
$ cd ../tapster-similar-product
$ pio eventserver
let eventClient = EventClient(accessKey: "<Your app's access key here>")

Run the simulator. In the home screen, tap Import Data and then Run Import button. The whole import will take a while. Check Xcode's debug console to see the progress.

# At the engine directory
$ pio train
$ pio deploy

Now the recommendation engine is ready and you can start reading comics! In the app home screen, tap the Start Reading button. You can then swipe right to like a comic and swipe left to dislike just like in Tinder!

Tutorial

For step-by-step instructions, check out the detailed tutorial.

License

Tapster iOS Demo is released under the MIT license. See LICENSE for details