In Chapter 2 (page 38 of the Extreme Mobile PDF) under "Implementing a Swift Protocol", the code sample should include defining the protocol as well as implementing it. The downloaded code itself is correct, only the book contains the oversight:
import UIKit
protocol DisplayableViewController {
func instantiateRootViewController(configuration: Dictionary<String, Any>) -> UIViewController
}
public class RecordingsProtocol: DisplayableViewController {
public init() {}
public func instantiateRootViewController() -> UIViewController {
let storyboard = UIStoryboard(name: "RecordingsUI", bundle: Bundle(for: RecordingsTVC.self))
let vc = storyboard.instantiateViewController(withIdentifier: "RecordingsNC")
return vc
}
}
In Chapter 2 (page 38 of the Extreme Mobile PDF) under "Implementing a Swift Protocol", the code sample should include defining the protocol as well as implementing it. The downloaded code itself is correct, only the book contains the oversight: