Errors in ViewController and AppDelegate

as you can see here the last line has an expected declaration. If I attempt to fix it, it trys to add an endless amount of ; before trying to delete them again.In this picture, it shows the error that I cannot find a clear fix to- the unresolved identifier "Request" on the line center.add(request);

The final screenshot is of it picking out errors in code it loaded with as standard. These have been here since I added the first bit of line to add notifications. It throws an error at self.saveContext() It says value of appdelegate has no member saveContext. Above you can see the warning that is caused my return true. I dont think this is causing any problems with the simulation but want to know why it is there.



Im new to swift and Xcode in general. I have followed some tutorials as I am getting stuck in certain places. Any help is much appreciated! Thanks!

(I also help you can see the pictures, they wont seem to show up)

Replies

as you can see here the last line has an expected declaration.

Alas, we can’t see, because DevForums does not allow you to post images (r. 22028729). You can post a link to an image; that’ll require moderator approval but it’ll come through pretty quickly. However, for issues with code it’s better to just post the code and the diagnostics as text.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Usually, expected declaration error is due to an unbalanced brackets.


Check in your file that you have effectively balanced any { with corresponding }