Learn Courses My Dashboard

M5 L5 problem with setting jsonUrl

After Line 33, jsonUrl is still nil even though I have valid info in my data.json file.

Any ideas why this is happening?

Try to clean the project and run it again. The code isn’t able to create the url for some reason

When stopping at that breakpoint you could type po Bundle.main.url….etc And see if a more specific error comes up

One thing you might want to check is that the data.json file has it’s “Target Membership” set.

Do that by selecting the data.json file in your Project Navigator on the left. Make sure that the right hand Xcode panel is visible and check that under the document tab in that right hand window the Target Membership is checked. See the following image where the arrow is pointing.

Thanks,

After quitting and restarting Xcode, the jsonUrl was set correctly, then the styleUrl was messed up because its Target Membership was not set to the app.

Finally, I can see the scroll view of the Learning App.