Tapster iOS Demo
- PredictionIO 0.12.0+
- Xcode 9.0+ and iOS 9.0+
Set up the PredictionIO Engine
- Clone the similar product engine for Tapster iOS
$ git clone https://github.com/minhtule/Tapster-iOS-Demo-Similar-Product-Engine.git tapster-similar-product
- Create a new PredictionIO app and build the engine.
# 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
- Install CocoaPods dependencies
$ 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
- Start the PredictionIO event server.
# Switch back to the engine directory $ cd ../tapster-similar-product $ pio eventserver
- Open the iOS project workspace
Tapster iOS Demo.xcworkspace(created by CocoaPods) in Xcode. We need to add the PredictionIO app's access key to the iOS app's
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.
- Now we can train and deploy our engine. In the engine directory, run
# 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!
For step-by-step instructions, check out the detailed tutorial.
Tapster iOS Demo is released under the MIT license. See LICENSE for details