Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.


macrumors newbie
Original poster
Jan 29, 2016
I've been trying to integrate the Yelp API into my app to populate a table view with nearby listings. After grabbing the sample Obj-C code and installing the pods, everything works fine. However, I wasn't aware that there was a special way in which Yelp intended for the mobile API to be implemented. I found their sample iOS project here: and after some issues with Frameworks and pods, I managed to get the project to run. I had to find some of the Frameworks myself and drag them into the project. Now I can get the app to run up to the first Table View in the attached image, but clicking any of the search choices throws a generic NSException error. Considering this is sample code directly from Yelp, I'm pretty disappointed that I have to mess with so many things just to get it to run, let alone get it to work right. Am I missing something? I made sure my repo was updated, I have the pods installed. I've checked the storyboard for obvious errors, but there are so many code files I don't even know where to start.

Any help would be appreciated.


  • Screen Shot 2016-07-08 at 11.49.55 AM.png
    Screen Shot 2016-07-08 at 11.49.55 AM.png
    500.8 KB · Views: 235


macrumors 6502
Oct 12, 2009
Well, with just looking at your image, it looks like there is a method that wants a request of some sort (most likely a NSURLRequest). If you click on that bar between your code editor and console log, you can see the previous method where the app crashed. Start there and work your way back.


macrumors 68040
Sep 2, 2008
This is a SIGABRT runtime exception. This is due to Apple's engineers trying to help you. They believe the code has made an error and they are telling you about it as soon as the error is detected.

The text at the top of the stack trace is Apple's message to you: "Terminating app ..." "reason: Cannot create task from nil request".

Looking at the stack trace the request it's talking about is a NSURLRequest that was supposed to be passed to the method [NSURLSession dataTaskForRequest:completion:] and it was called in the method: [YLPClient queryWithRequest:completionHandler]. As the assertion says, the code has passed nil instead of a valid request.

I would suggest setting a breakpoint in that method and then you can see why the request is nil.
  • Like
Reactions: kage207
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.