Register
Submit a solution
The challenge is finished.

Challenge Overview

INTRODUCTION

This is one of several challenges to build a Cocoa Touch framework for communicating with the REST services built out in the previous San Antonio challenges. In this challenge we'll be focusing on implementing the Attendees Authorization REST service documented here: http://docs.sanantoniorestservices.apiary.io/

The framework built in this challenge will be used as the basis for building out communications with the remaining services.  The framework should be built using Swift and ARC. It should include the following classes/functionality:

DETAILED REQUIREMENTS

REST Singleton

Create a REST singleton class for communicating with the services. The singleton should use NSURLSession and its delegate methods to do service requests.  Network connectivity should be checked before attempting any network communications.  Any errors should be returned as NSError objects.

API Base URL: https://appirio-bmcsoftware.cs15.force.com/myebc

The singleton should have the following methods:

func requestAuthorizationWithEmail(email: NSString, andPin pin: NSString, withDelegate delegate: RESTDelegate)

This method will do a PUT to /services/apexrest/ebc/1.0/attendee/authorize to request an EBCKEY. It will perform delegate callbacks on success or failure of the call.

RESTDelegate Protocol

The RESTDelegate protocol should implement the following authorization methods:

func authorizationPassedWithKey(key: NSString)

Successful requests will call this delegate method and return the EBCKEY value.

func authorizationFailedWithError(error: NSError)

Failed requests will call this delegate method and return an error object with details.

Sample Project

Include a sample Xcode project written in Swift with a simple UI that includes a text input for an email address and a pin, as well as a button to make the REST call.  This project should implement all methods outlined above. On success, store the EBCKEY in the keychain under the key "EBCKEY" and display it on screen.  On error show a UIAlert with the error code/message.



Final Submission Guidelines

SUBMISSION GUIDELINES

  • Cocoa Touch framework Xcode 6 project with well commented code
  • Sample Xcode 6 project written in Swift using the framework as outlined above
  • Code must compile against iOS SDK 8.0 with a deployment target of iOS 7.0
  • Upload all source projects as a zip
  • After submission phase has completed, make a merge request targeting this branch
  • Provide a video overview of your submission

SETUP

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30046135