Engineering

Escape from Times Square

Matt: “Can you get the Uber?”

Andrew: “Sure… aghh, never mind…”

Matt: “Times Square bug?”

Andrew: “Yep.”

Matt: “I can’t believe they haven’t fixed this by now.”

Andrew: “How do I work around it again?”

Matt: “Restart your phone.”

For most of 2016, the Lickability team was plagued with an iOS issue causing all of our devices to report their current locations to be in the center of Times Square, New Yorkers’ favorite spot in the city.

A screenshot of the Apple Maps app with the current location set to Times Square. Not again…

The only consistent workaround was to restart our phones. After conferring with other iOS developers outside of the company, we believed it to be a widespread problem. Researching online left us wondering how this hadn’t been reported to Apple or heavily discussed on forums.

As time went on, frustration grew. Location sharing in Messages and Find My Friends would suggest we spent most of our days waiting in line for last minute discounts on Broadway tickets at TKTS. Rather than exploring some of the best restaurants in the world, friends assumed we were waiting patiently outside of Olive Garden with restaurant buzzer in hand. Transit and walking directions were misleading, ordering food from Seamless became a hassle, and I frequently found myself shouting “No Foursquare, I’m not back at M&M’s world!” Core Location had gone from helpful to irritating. After months of dealing with this issue, and continuing to reach out to other developers in desperation, we were reminded of a debugging feature of Xcode to simulate location.

A screenshot of Xcode's scheme editor displaying the Core Location options simulating a location of NYC. Edit Scheme… → Run → Options

This was a great starting point. The only issue was, none of us had used this debugging tool, and it was still happening to us. Which brings us to our next friend:

A screenshot of the Xcode scheme editor highlighting the "Shared" scheme checkbox.

At some point, one of us had pushed a change to a shared run scheme on a client project to simulate the device or simulator location to “New York, NY”. Those “other iOS developers” who shared in our frustration early on were employees of the client. We had done this to ourselves! Merely running the app using the default scheme in the Xcode project would spread the problem to a device, persisting long after the work day had ended. Finally, Lickability could breathe a collective sigh of relief, share a few laughs, and learn the lesson of not carefully reviewing changes inside of xcshareddata.

Special thanks to Jeff Forbes for pointing us in the right direction to help us escape from Times Square.