Skip to content

Instantly share code, notes, and snippets.

@odino
Forked from unlucio/gist:38e709fbbf100312e8fa
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odino/8549219df2e389ff197b to your computer and use it in GitHub Desktop.
Save odino/8549219df2e389ff197b to your computer and use it in GitHub Desktop.

Solve the following task at your best:

Create a simple app (min iOS version: 6) able to consume a JSON API (/products/) returning a list of objects as follows:

{
	id: <int>,
	sku: <string>,
	productName: <string>,
	brandName: <string>,
        image: <url>
	price: <int>
	productPage: <url>
}

The API accepts 2 params:

  • from: a product ID to start from
  • count: how many products my consumer wants to retrieve

ex:

/produts/?from=100&count=50

You app should:

  • consume the API displaying it with an infinite scrolling mechanism
  • persist the objects in a cache used when the app is started/restarted
  • when a table row is tapped it will open the product's details (productPage url) in a webview

Also: the opened webpage might send a message to the app by setting its location to:

namshi://?message=<string>
  • catch that message and display it.

Bonus points :)

  • search product by either name or brand name
  • universal app resizing the view accordingly to iPhone, iPad and iPad mini using autoLayout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment