Skip to content

Instantly share code, notes, and snippets.

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

Solve the following task at your best:

Create a simple app (min iOS verison: 6) able to consume an infinite JSON product 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 in an infinite table
  • 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 tot he app by setting its location to:

namshi://?message=<string>
  • catch that message and display it.
Bonus points:
  • search an item by product by patching either it's product name or it's 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