Intermediate iOS Debugging - Part 2: | Ray Wenderlich Videos

Create exception breakpoints to make finding the cause of an unhandled exception easier. See how to share breakpoints between projects or multiple users of a project.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4744-intermediate-ios-debugging/lessons/2

Hello

I’m getting a different error from the Download Materials on line 133 in PhotoFeedModel.swift

self.currentPage = json["current_page"] as! UInt Thread 3: Fatal error: Unexpectedly found nil while unwrapping an Optional value

500px is no longer offering this API, 403 Forbidden

{
“error”: “Application is deactivated, please contact us by email: help@500px.com.”,
“status”: 403
}

Licensing on 500px is now exclusive to Getty Images and VCG: 500px Marketplace has closed.

@jerbeers Can you please help with this when you get a chance? Thank you - much appreciated! :]

You’re right about the API. I’ve contacted 500px and will be working on a fix for this. Sorry for the trouble.

Sorry this has taken a while to fix. I uploaded new code to this repo: https://github.com/raywenderlich/Catstagram. The line numbers may not match, but most of the project is fundamentally the same, just with a new API.

Thanks going to check it out.

Hey everyone, I’m on video number 2 of part 1. I downloaded the project files and run the Xcode project. However, when I run the project I see there is a “Thread 4: Fatal error: Unexpectedly found nil while unwrapping an Optional value”, whereas the video mentions an error with how the table view is set up (a different area of code in the project). What am I doing wrong? Were the project files recently updated to match other parts of the course?

This is what I’m getting:

I’m not able to go ahead with the tutorial because the project files don’t seem to be aligned with the video.

See comments above. The 500px API had to be replaced.

Whoops I missed that thanks!

Hi Jerry,

I downloaded your code from github but it works without generating any exception. There is nothing to troubleshoot and it’s not possible to follow your course and practise.

same here. Would like to walk through the errors using the new code

You can still go through and follow the course.

  1. downloaded the updated code from https://github.com/raywenderlich/Catstagram
  2. watch the course and see what the original content is
  3. break the code by seeing what cs file @jerbeers is referring to
  4. fix it

So for example

  • lesson 1.2


line 115 will break the course. line 116 will fix the lesson

  • lesson 2.9
    There is no output for cell.photoDescriptionLabel.text
    but you can add this to the lldb
    p cell.photoDescriptionLabel.text = “hello”; let label = cell.photoDescriptionLabel.text; print(label!)

For me, this is a good way to test if I understand the course.

Thanks @kaitlynhwang, we definitely need to update this course to make it easier to follow, but you nicely described the steps you’ll need to take for now. This is a good example of the risks you take when integrating with a third party.

Just ran into this problem myself.

Ironically, I used my debugging skills to find out what the problem is.

I’m not sure why, either a) this course is deprecated, or b) the downloads are updated to keep up with the changes.

This sort of thing is what really put me off when I was a beginner. I could never be sure whether it was a mistake that I was making, or with the code that I was downloading, or things being out of date. Please fix or deprecate the course asap.