Learn Courses My Dashboard

Full Stack iOS Note App

I am at the end of the 2nd video and when I run my app, it displays an error message saying that it failed to decode which means that the information from my server could not connect to Xcode. Here is my code.

“Failed to decode” means that you couldn’t decode the data with the JSON Decoder. Not that your Xcode can’t connect to the server

Are you getting back data in the APIFunctions where you’re printing the response data??

Double check that your model is written correctly

When I create/delete/update a note in Postman, it displays it on the web browser which means that there is something wrong in Xcode, but I don’t know what.

Gotcha, in your catch statement add print(error)

To see what the real error is, rather than your print statement that you have now

Thank you so much. I saw that there was a problem with the id value I set and when I looked back in the video I remembered that there was an underscore before id.

1 Like