The return value is declared to be of type
AnyObject, which is the Swift replacement for Objective-C’s
- 1. Introduction to Swift
- from Network Programming with Swift: Tools and Techniques to Create iOS and OS X Apps that Network
- Publisher: Addison-Wesley Professional
- Released: January 2018
AnyObject is indeed the equivalent of id's, except on the handling of nil. Be wary of nil references in swift as they are handled differently from Objective-C (and the use of ! and ? on de definitions is sub-optimal - kind of forcing swift to behave like Objective-C, which defeats some of it's advantages).
Share this highlighthttp://www.safaribooksonline.com/a/network-programming-with/4036351/