mercredi 21 juin 2017

Check zipcode to see if App will work in a certain location

I am working on an iOS App (in Swift 3) and one of the first validations in the app would be to check if the App provides service at the user's location/city/zip (US only). The idea is to prompt the user to enter their zip code before they can sign up and validate the same to make sure that the App provides service at that location. The backend for the app would be Firebase database, but I am not sure of how to design this validation.

I notice that there are many apps like this (for example Uber in it's early stages) where it prompts for the user's zip or gets it through Location services to validate if the app serves in that location or not.

Would it be good design to store all the zip codes and/or zip code ranges that the app would serve in the database (in my case firebase DB) and then validate against that dataset? I would assume that the dataset may eventually become cumbersome to query and maintain as the app grows through geography, but is there a better way to achieve this? I reckon that this decision may cause a ton of headaches down the road so even though this is a design related question and could be opinion based, I couldn't find a better forum to ask this.

Aucun commentaire:

Enregistrer un commentaire