@simons1994 Thanks very much for your question, and my apologies for the delayed response.
It appears you are working with an older version of our book, and code as the code you pasted above is Objective-C, and our recent editions of the book use Swift.
Is this still a problem for you? My advice is to use a newer edition of our book, which you should have access to, and use the corresponding source code which should be in Swift. This way, you won’t have to deal with figuring out why the above code is present in the starter project