Building and Testing Yelp Mobile
The mobile team at Yelp always strives to bring the best possible experience to your mobile device, but what does it take to accomplish this? For Yelp’s iOS app, in addition to tools used by many iOS developers — Xcode for a development environment, Git for version control — we have found other useful tools and libraries to improve our development experience. If you’ve ever appreciated our app and wondered what goes into its development, we’re happy to shed some light on what tools from the iOS development community we make use of, and we even have some of our own to share!
The foundation upon which the Yelp app is built is YelpKit. YelpKit is an Objective-C library that provides reusable controls and helpful extensions for Apple’s UIKit framework. YelpKit can assist with tasks from making requests and caching images to using pull-to-refresh. In fact, we found YelpKit to be so useful that we open-sourced it so we could use it in our own personal projects. Check out YelpKit on GitHub for instructions on using YelpKit and to see what features would come in handy for you!
Of course, with all the work you put into building your app, you want to make sure it works! Automated testing is an important tool used by many developers, and the iOS developers at Yelp are no exception. We use GHUnit for unit testing and also make heavy use of its view testing capabilities; tests in GHUnit are run on an iOS device or emulator, and the resulting view of your app can be saved to an image file and compared against previous runs. GHUnit’s view tests prove invaluable for catching inadvertent changes, and can even help detect minute changes that occur from updates to the iOS SDK.
As useful as automated testing is, getting your app into the hands of as many people as possible is still one of the surest ways to find bugs. This is where TestFlight comes in: TestFlight is a free service that makes it easy to distribute your app to testers. Testers must join TestFlight and be included in your app’s ad hoc provisioning profile. When you want to release a new version of your app for testing, you just upload the compiled IPA file and TestFlight will notify your testers that it is available for download! Testers need only click a link in this email to begin installing the app. You can choose to which testers to distribute the file, and TestFlight provides analytics indicating, for example, which testers have opened the email or if any have had problems installing your app. With our sharp group of fellow iPhone-wielding engineers eager to try out new features, this convenience offered by TestFlight allows Yelp to rapidly distribute and receive feedback on beta builds of apps.
With the help of GHUnit and TestFlight, we manage to keep the Yelp app in good shape! Inevitably, though, some bugs can slip through, so we use Crashlytics to help us get to the bottom of any crashes that crop up once the app is released to the App Store. Crashlytics is a crash reporting solution that supplements the crash logs available through iTunes Connect. After configuring Crashlytics, the debug symbols (dSYM) for your app are uploaded to Crashlytics during the build; if your app crashes, a crash log is sent to the Crashlytics servers and symbolicated. Crashes are ordered by their prevalence in Crashlytics’ web interface, so at a glance you can tell what issues are most pressing and then start digging through the stack trace in order to keep your app functional and your users happy.
In the lively iOS development community, you don’t have to look very far to find all sorts of useful tools and libraries. In showing you those that helped Yelp reach its success, we hope you’re excited about these tools, and we can’t wait to see what you can make using them!