The new app will need to be able to determine the "Closest" vendor relative to the device location. Getting the location of the device is mostly simple. There are plenty of tutorials to show you how to add the library and hook thinks together.

But how do you search for the closet vendor on the back end using mySQL.

After a little paying around with getting the build_facebook_ios_sdk_static_lib.sh script to build the linked library and getting the .a file recognized by XCode I cam across this super simple way to get it done