2 Replies
      Latest reply: Sep 27, 2016 4:11 AM by Claude31 RSS
      AlexRyanC Level 1 Level 1 (0 points)

        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)

        • Re: Errors in ViewController and AppDelegate
          eskimo Apple Staff Apple Staff (6,250 points)

          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"

          • Re: Errors in ViewController and AppDelegate
            Claude31 Level 4 Level 4 (825 points)

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

             

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