This is a simple iOS app that relies on [Cloudant Sync datastore library] (https://github.com/cloudant/CDTDatastore) for persistence & synchronization.
So far, you can:
- Create/delete a question
- Add options to a question
- Create/delete an answer
- Pull to refresh to manually trigger a synchronization
- Press + to create a question
- Select a question
- Press + to create an answer
- Press + to create an option
- Select one or multiple options and press Save
After every action, the app tries to synchronize changes with a Cloudant database. You can also 'Pull to refresh' to trigger a synchronization.
To provide a Cloudant database, first you have to create it:
- Sign in to access Dashboard
- Create a database
- Select the new database
- Select 'Permissions'
- Generate an API key
- The API key requires read and write permissions
Then you have to add to the Xcode project a plist file called 'cloudantAnswersDatabaseURL.plist' and this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>url</key>
<string>https://<API KEY>:<API KEY PASSWORD>@<YOUR USERNAME>.cloudant.com/<DATABASE NAME></string>
</dict>
</plist>
If you try to run the app before adding this file, Xcode will not be able to build the app.
See LICENSE
- CDTDatastore, is under the Apache License 2.0.
- UIAlertView+Blocks, is under the MIT License.