Swift iPhone and iPad Client for Polls API, using Hyperdrive API client

Overview

Polls Client

Build Status

This is a Swift iPhone and iPad client for the Polls API - a simple application allowing users to view polls and vote in them.

Polls is an example application utilising the Hyperdrive API client. Hyperdrive will communicate to the Polls API without any hard-coded knowledge about how the API is implemented, just an understanding of the semantics the API is using.

The application does this by learning how the API works at run-time. This can be achived in one of two ways:

  • By downloading the API specification in API Blueprint format.
  • Talking directly to an API that exposes it's features and transitions in the API, such as with the Siren hypermedia content type.

Both the API and the application support both of these ways, you can switch between these modes in the application settings.

Screenshot of Polls iOS Application

Quick Start

You will need to install CocoaPods and then run the following steps to checkout the project and install the dependencies.

$ git clone https://github.com/apiaryio/polls-app
$ cd polls-app
$ pod install
$ open Polls.xcworkspace

Architecture

This application uses the MVVM (Model View View-Model) software architecture. Where each view controller has an appropriate view model which contains all of the model logic. The view model in this case will encapsulate the logic required to communicate to the API.

The Polls application is constructed from three view controllers and view models:

  • Question List - Shows a list of questions and may allow the user to create a new question or view the detail of a question.
  • Question Detail - Shows a specific question, and may allow a user to vote on the choices available on a question.
  • Create Question - Allows the user to create a new question in the API.

API Root

The Polls iOS client can be configured to use any API root, or switch between connecting to a Hypermedia API or the JSON Polls API described via an API Blueprint. You can switch between these modes by entering the applications settings.

Defaults:

  • Hypermedia: https://polls.apiblueprint.org/ - A hosted version of a Hypermedia Polls API.
  • API Blueprint: https://raw.githubusercontent.com/apiaryio/polls-app/master/apiary.apib - An API Blueprint found at this URL (hosted on GitHub in this repository).
  • Apiary: pollsapp - An API Blueprint hosted on Apiary.

License

Polls is released under the MIT license. See LICENSE.

Comments
  • Add a user interface for switching environments

    Add a user interface for switching environments

    This introduces a new user interface in a secret menu (shown when you shake the device/simulator) allowing you to switch to between different modes of accessing the API (hypermedia vs API Blueprint) and to configure the URLs and domains to access the API.

    Here's how it looks:

    ios simulator screen shot 28 apr 2015 17 33 32

    /cc @fosrias

    Closes #5

    opened by kylef 3
  • Add pull to refresh on question detail screen providing the server exposes a self transition

    Add pull to refresh on question detail screen providing the server exposes a self transition

    This pull request adds pull to request on the question detail screen if the server exposes a self transition. It will also update the question list when we vote too (fixing #14).

    enhancement 
    opened by kylef 1
  • Add a list of acknowledgements

    Add a list of acknowledgements

    This pull request changes the settings screen to include acknowledgements (the open source components it depends on) along with the applications version number.

    opened by kylef 1
  • Remove fastlane for screenshots

    Remove fastlane for screenshots

    After various changes (Xcode 7, 8 and 9) fastlane as we use it here won't work. To fix this to work in any recent (last 2 years) version of Xcode we would need to write the screenshot generation to use Xcode UI Tests. This is effectively deadcode.

    opened by kylef 0
  • Allow NSAllowsArbitraryLoads

    Allow NSAllowsArbitraryLoads

    Any apps compiled against the iOS 9 SDK are subject to ATS (App Transport Security) which require https and TLS 1.2 or newer. This change disables that so that connections to non-https are allowed since this is an example application where you may want to connect to non-https hosts (such as a local development server).

    opened by kylef 0
  • Bug in version 1.0.0 (33)

    Bug in version 1.0.0 (33)

    Scenario:

    1. select question
    2. remember number of votes
    3. volte 3-4x for some choice
    4. go back to menu
    5. select some question
    6. compare number of votes

    Result: votes are some in 2 and 6

    bug 
    opened by abtris 0
  • Use snapshot to record screenshots

    Use snapshot to record screenshots

    This pull request incorporates snapshot a tool for automating screenshots. I used this to create all the screenshots for every device when uploading to the iOS application store.

    screen shot 2015-06-23 at 16 47 24

    opened by kylef 0
  • Smooth transition clearing selection on appearance

    Smooth transition clearing selection on appearance

    These changes resolve a subtle bug during animation of the selected cell when transitioning from the question detail view controller back to the question list view controller.

    opened by kylef 0
  • [Create Question] Change ACL for nav button actions from private to internal

    [Create Question] Change ACL for nav button actions from private to internal

    While being private apparently means UIKit (the navigation bar button item) cannot call these them. In a recent commit where I cleaned up the internal API to make various methods private and introduced a bug where tapping the cancel button would cause an application crash.

    opened by kylef 0
Owner
Apiary
Apiary
A simple To-do list app build for iPhone, iPad and Apple Watch in Swift

A simple To-do list app build for iPhone, iPad and Apple Watch in Swift

Radu Ursache 186 Dec 28, 2022
iCome Out is an open source project of an unofficial Pornub app for iPhone and iPad

iCome Out is an open source project of an unofficial Pornub app for iPhone and iPad, written in Swift with some cool features Getting Started Prerequi

Anon 3 Dec 1, 2022
iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.

iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.While the cost of storage seems expensive in comparison to other online storage services, its advantage is that it works natively across all your devices.

MindInventory 12 Jul 29, 2022
OctoPod is a free open source iPhone/iPad app for OctoPrint

OctoPod OctoPod is a free open source iPhone/iPad app for OctoPrint. Build Instructions Download Xcode You will need to install Swift 5.0 and Xcode 11

Gaston Dombiak 193 Dec 30, 2022
iOS Trakt Client - Keep track of your favorite TV shows and movies on your iPhone. (Under development)

CouchTracker Keep track of your favorite movies and tv shows on your iPhone Setup for development You will need Xcode 11.2.1 Swift 5.1.2 Run the follo

Pietro Caselani 42 Apr 19, 2022
A simple drawing app for iPad using SwiftUI

TinyDraw A small little drawing app fro iPad using SwiftUIs Canvas view. Implemented along the HWS+ live stream by Paul Hudson. Features Drawing lines

Philipp 6 Dec 14, 2022
An application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient inventory tracking.

ChopChop ChopChop is an application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient in

Seow Alex 0 Dec 23, 2021
Swift Playgrounds 4 app created on the iPad

Spiro Swift Playgrounds 4 app created on the iPad^. ^ Xcode also used as explained below. ?? Screenshots ?? What is Spiro? An interactive animating sp

An Trinh 26 Jan 6, 2022
Daydreamer - A Figma viewer created in Swift Playgrounds for iPad

Daydreamer A native Figma client for iPad, created exclusively using Swift Playg

featherless 3 Feb 18, 2022
SwiftUI Jam 2021 - iPad Realtime Calculator

SwiftUI Jam 2021 - iPad Realtime Calculator A SwiftUI iPad calculator with realtime activity Features Addition, Subtraction, Multiplication, Division

Joel Sereno 3 Jan 13, 2022
DevToys for iPad - a SwiftUI reimplementation of DevToys, a Swiss Army Knife for developers, for iPadOS

DevToys for iPad - a SwiftUI reimplementation of DevToys, a Swiss Army Knife for developers, for iPadOS

Kenta Kubo 25 Nov 5, 2022
An iPhone Simulator "Wrapper" for SwiftUI Apps on macOS

SwiftUIPhone Run a SwiftUI app (or any SwiftUI view) in an iPhone Simulator "wrapper", directly on macOS! To be clear, this is not an iPhone Simulator

Justin Kaufman 7 May 20, 2022
A simple health assistant app built in Swift5 for iPhone 📱

Health-Habit-Assistant A simple habit forming app build for iPhone in Swift 5 (iOS 11+) (This Project is designed to be used in China 4C Computer Comp

Masayuki Inamori 381 Dec 27, 2022
iPhone App for identifying resistors.

IDResistors Download on the App Store! IDResistors is a simple app for identifing the values smd and through hole resistors. It's developed using Swif

Marc Rummel 10 Oct 18, 2022
Xkcd iPhone app

This is the repo behind http://bit.ly/xkcdapp, an iOS xkcd reader. The code started as a learning project back on iOS 2.0 and has been through a lot s

Paul Rehkugler 41 Sep 20, 2022
null 1 Jan 27, 2022
Aquarium Life is an iPhone app for management of Home Aquariums

Aquarium life Aquarium Life is an iPhone app for management of Home Aquariums. The app was launched on Apple App Store in 2021 but removed after my me

Sahil Satralkar 3 Apr 11, 2022
SafeTimer es una app para iPhone y Apple Watch que te ayuda a controlar el tiempo que has usado una mascarilla.

SafeTimer es una app para iPhone y Apple Watch que te ayuda a controlar el tiempo que has usado una mascarilla.

Chubby Apps 13 Sep 20, 2022
Trivia about Animal Crossing: New Horizons. My first iOS (iPhone) app.

ACNH-trivia-iOS-app Trivia about Animal Crossing: New Horizons. This is my first iOS (iPhone) app. I am excited to start my journey as an iOS develope

Katie Saramutina 2 Apr 14, 2022