Register
Submit a solution
The challenge is finished.

Challenge Overview

INTRODUCTION

This is the second challenge in a series 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 extending our existing framework by implementing the Consolidata Data REST service documented here: http://docs.sanantoniorestservices.apiary.io/

DETAILED REQUIREMENTS

You’ll be updating the framework and sample project from the first challenge to include the functionality described below.  All code should be written in Swift and utilized ARC.

SARestApi.swift

Add to the existing singleton class used 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.

Add the following methods to the singleton class:

func requestConsolidatedDataWithKey(key: NSStringdelegate: SARestDelegate)

The “key” value is the value of the EBCKEY stored in the keychain.  This functionality was completed in the first challenge.

SARestDelegate.swift

Add the following methods to the existing delegate protocol:

func consolidatedDataReceived(data: NSDictionary)

Succesful requests will call this method and return the JSON retrieved from the service as a NSDictionary object.

func consolidatedDataFailedWithError(error: NSError)

Failed requests will call this method and return and NSError object with details.

SampleApp

Update the sample project in the repository to implement all methods outlined above. On success display the returned JSON string in a UIScrollView contained within a new UIVIew.  On error show a UIAlert with the error code/message.



Final Submission Guidelines

SUBMISSION GUIDELINES

  • Updated Cocoa Touch framework Xcode 6 project with well commented code

  • Updated 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

  • Include your gitlab username and URL of your forked repository in your documentation

  • Provide a video overview of your submission

SETUP

Send an email to lazybaer or harrywynn for an API user email and PIN to request authorization if you do not already have one. Include your Topcoder user name in the request.

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30046276